summaryrefslogtreecommitdiff
path: root/indra/llcommon
diff options
context:
space:
mode:
authorandreykproductengine <akleshchev@productengine.com>2016-10-28 17:29:30 +0300
committerandreykproductengine <akleshchev@productengine.com>2016-10-28 17:29:30 +0300
commit26e73e2f5822bde8ece0c01ba6445bbe0f042180 (patch)
tree2e58358dc520c15435f576a7e32112346d3ff546 /indra/llcommon
parent348807d23dff1cfda8b7e85a8ccc6794d3286596 (diff)
MAINT-6825 Fixing bad_alloc crash
Diffstat (limited to 'indra/llcommon')
-rw-r--r--indra/llcommon/llsdserialize.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/indra/llcommon/llsdserialize.cpp b/indra/llcommon/llsdserialize.cpp
index d49ff0feb5..81ba8631c6 100644
--- a/indra/llcommon/llsdserialize.cpp
+++ b/indra/llcommon/llsdserialize.cpp
@@ -1200,6 +1200,7 @@ bool LLSDBinaryParser::parseString(
read(istr, (char*)&value_nbo, sizeof(U32)); /*Flawfinder: ignore*/
S32 size = (S32)ntohl(value_nbo);
if(mCheckLimits && (size > mMaxBytesLeft)) return false;
+ if(size < 0) return false;
std::vector<char> buf;
if(size)
{