From dcfccc6f435610077592bbddcef2468c64f27f2f Mon Sep 17 00:00:00 2001 From: andreykproductengine Date: Tue, 28 Nov 2017 15:55:40 +0200 Subject: MAINT-8022 Crashes in unzip_llsd #2 --- indra/llcommon/llsdserialize.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'indra/llcommon/llsdserialize.cpp') 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]; -- cgit v1.2.3