diff options
Diffstat (limited to 'source/ByteBuffer.cpp')
-rw-r--r-- | source/ByteBuffer.cpp | 5 |
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);
}
|