MAINT-6825 Fixing bad_alloc crash

master
andreykproductengine 2016-10-28 17:29:30 +03:00
parent 348807d23d
commit 26e73e2f58
1 changed files with 1 additions and 0 deletions

View File

@ -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)
{