From a358a3caaee2a4781f910cfb440bd822ae73a7e5 Mon Sep 17 00:00:00 2001 From: Loki Rautio Date: Mon, 9 Mar 2026 04:46:56 -0500 Subject: Revert accidentally pushed "LCEMP RCE fixes" This reverts commit d557ca2dfba5ffcca99ceb41b07d149f871964b5. --- Minecraft.World/ByteArrayInputStream.cpp | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'Minecraft.World/ByteArrayInputStream.cpp') diff --git a/Minecraft.World/ByteArrayInputStream.cpp b/Minecraft.World/ByteArrayInputStream.cpp index 9509206d..d79eff36 100644 --- a/Minecraft.World/ByteArrayInputStream.cpp +++ b/Minecraft.World/ByteArrayInputStream.cpp @@ -10,19 +10,8 @@ //offset - the offset in the buffer of the first byte to read. //length - the maximum number of bytes to read from the buffer. ByteArrayInputStream::ByteArrayInputStream(byteArray buf, unsigned int offset, unsigned int length) - : pos(offset), mark(offset) + : pos( offset ), count( min( offset+length, buf.length ) ), mark( offset ) { - if (offset > buf.length) - { - count = buf.length; - } - else if (length > buf.length - offset) - { - count = buf.length; - } - else - { - count = offset + length; this->buf = buf; } -- cgit v1.2.3