MAINT-8022 Crashes in unzip_llsd #2

master
andreykproductengine 2017-11-28 15:55:40 +02:00
parent e5ef898728
commit dcfccc6f43
1 changed files with 5 additions and 1 deletions

View File

@ -2144,7 +2144,11 @@ bool unzip_llsd(LLSD& data, std::istream& is, S32 size)
const U32 CHUNK = 65536;
U8 *in = new U8[size];
U8 *in = new(std::nothrow) U8[size];
if (!in)
{
return false;
}
is.read((char*) in, size);
U8 out[CHUNK];