aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.World/ByteArrayOutputStream.cpp
diff options
context:
space:
mode:
authorLoki Rautio <lokirautio@gmail.com>2026-03-09 04:46:56 -0500
committerLoki Rautio <lokirautio@gmail.com>2026-03-09 04:46:56 -0500
commita358a3caaee2a4781f910cfb440bd822ae73a7e5 (patch)
tree638ff44db51c8e27826e56bacb5af764f98ef2d0 /Minecraft.World/ByteArrayOutputStream.cpp
parentd557ca2dfba5ffcca99ceb41b07d149f871964b5 (diff)
Revert accidentally pushed "LCEMP RCE fixes"
This reverts commit d557ca2dfba5ffcca99ceb41b07d149f871964b5.
Diffstat (limited to 'Minecraft.World/ByteArrayOutputStream.cpp')
-rw-r--r--Minecraft.World/ByteArrayOutputStream.cpp18
1 files changed, 1 insertions, 17 deletions
diff --git a/Minecraft.World/ByteArrayOutputStream.cpp b/Minecraft.World/ByteArrayOutputStream.cpp
index a6fdad8f..a9f36e04 100644
--- a/Minecraft.World/ByteArrayOutputStream.cpp
+++ b/Minecraft.World/ByteArrayOutputStream.cpp
@@ -53,25 +53,9 @@ void ByteArrayOutputStream::write(byteArray b, unsigned int offset, unsigned int
{
assert( b.length >= offset + length );
- if (offset > b.length || length > b.length - offset)
- {
- return;
- }
-
- if (length > 0xFFFFFFFF - count)
- {
- return;
-
// If we will fill the buffer we need to make it bigger
if( count + length >= buf.length )
- {
- unsigned int newSize = (std::max)(count + length + 1, buf.length * 2);
- if (newSize <= buf.length)
- {
- return;
- }
- buf.resize(newSize);
- }
+ buf.resize( max( count + length + 1, buf.length * 2 ) );
XMemCpy( &buf[count], &b[offset], length );
//std::copy( b->data+offset, b->data+offset+length, buf->data + count ); // Or this instead?