summaryrefslogtreecommitdiff
path: root/indra/llcommon/llsdserialize.cpp
diff options
context:
space:
mode:
authorandreykproductengine <andreykproductengine@lindenlab.com>2017-11-28 15:55:40 +0200
committerandreykproductengine <andreykproductengine@lindenlab.com>2017-11-28 15:55:40 +0200
commitdcfccc6f435610077592bbddcef2468c64f27f2f (patch)
treee39e146f193bee466ec3f81ac99846b859db9751 /indra/llcommon/llsdserialize.cpp
parente5ef898728b5881eb1f233aa4e0dc9dbbd0991a5 (diff)
MAINT-8022 Crashes in unzip_llsd #2
Diffstat (limited to 'indra/llcommon/llsdserialize.cpp')
-rw-r--r--indra/llcommon/llsdserialize.cpp6
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];