Skip to content
Snippets Groups Projects
Commit 26e73e2f authored by andreykproductengine's avatar andreykproductengine
Browse files

MAINT-6825 Fixing bad_alloc crash

parent 348807d2
Branches
Tags
No related merge requests found
...@@ -1200,6 +1200,7 @@ bool LLSDBinaryParser::parseString( ...@@ -1200,6 +1200,7 @@ bool LLSDBinaryParser::parseString(
read(istr, (char*)&value_nbo, sizeof(U32)); /*Flawfinder: ignore*/ read(istr, (char*)&value_nbo, sizeof(U32)); /*Flawfinder: ignore*/
S32 size = (S32)ntohl(value_nbo); S32 size = (S32)ntohl(value_nbo);
if(mCheckLimits && (size > mMaxBytesLeft)) return false; if(mCheckLimits && (size > mMaxBytesLeft)) return false;
if(size < 0) return false;
std::vector<char> buf; std::vector<char> buf;
if(size) if(size)
{ {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment