summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-12-27 08:11:37 +0100
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-12-27 08:11:37 +0100
commit025cdfb201ce8cb3c5616016b48803d62236e3de (patch)
tree0f3a30782ebfb9082c046c911b08846c52f72b9d /source
parentAdded flower pots (diff)
downloadcuberite-025cdfb201ce8cb3c5616016b48803d62236e3de.tar
cuberite-025cdfb201ce8cb3c5616016b48803d62236e3de.tar.gz
cuberite-025cdfb201ce8cb3c5616016b48803d62236e3de.tar.bz2
cuberite-025cdfb201ce8cb3c5616016b48803d62236e3de.tar.lz
cuberite-025cdfb201ce8cb3c5616016b48803d62236e3de.tar.xz
cuberite-025cdfb201ce8cb3c5616016b48803d62236e3de.tar.zst
cuberite-025cdfb201ce8cb3c5616016b48803d62236e3de.zip
Diffstat (limited to 'source')
-rw-r--r--source/ByteBuffer.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/source/ByteBuffer.cpp b/source/ByteBuffer.cpp
index 028b4f08a..6d630068a 100644
--- a/source/ByteBuffer.cpp
+++ b/source/ByteBuffer.cpp
@@ -316,6 +316,11 @@ bool cByteBuffer::ReadBEUTF16String16(AString & a_Value)
{
return false;
}
+ if (Length < 0)
+ {
+ ASSERT(!"Negative string length? Are you sure?");
+ return true;
+ }
return ReadUTF16String(a_Value, Length);
}