diff options
author | andreykproductengine <andreykproductengine@lindenlab.com> | 2017-11-28 15:55:40 +0200 |
---|---|---|
committer | andreykproductengine <andreykproductengine@lindenlab.com> | 2017-11-28 15:55:40 +0200 |
commit | dcfccc6f435610077592bbddcef2468c64f27f2f (patch) | |
tree | e39e146f193bee466ec3f81ac99846b859db9751 | |
parent | e5ef898728b5881eb1f233aa4e0dc9dbbd0991a5 (diff) |
MAINT-8022 Crashes in unzip_llsd #2
-rw-r--r-- | indra/llcommon/llsdserialize.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/indra/llcommon/llsdserialize.cpp b/indra/llcommon/llsdserialize.cpp index 7f286f5e68..ede212181d 100644 --- a/indra/llcommon/llsdserialize.cpp +++ b/indra/llcommon/llsdserialize.cpp @@ -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]; |