diff --git a/indra/llcommon/llsdserialize.cpp b/indra/llcommon/llsdserialize.cpp
index 7f286f5e6851a3a20a962353d14fdc467e11aa04..ede212181d96e2ada8d01a65c4155a2841534f46 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];