From 354ccc1640dd223ccea20908183cc05a00ecaf6f Mon Sep 17 00:00:00 2001 From: "Brad Payne (Vir Linden)" Date: Fri, 15 Feb 2013 13:44:21 -0500 Subject: additional safety check for bad appearance messages --- indra/llprimitive/llprimitive.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra') diff --git a/indra/llprimitive/llprimitive.cpp b/indra/llprimitive/llprimitive.cpp index faf98883d9..cf6a3f97d2 100755 --- a/indra/llprimitive/llprimitive.cpp +++ b/indra/llprimitive/llprimitive.cpp @@ -1259,7 +1259,7 @@ S32 LLPrimitive::parseTEMessage(LLMessageSystem* mesgsys, char const* block_name mesgsys->getBinaryDataFast(block_name, _PREHASH_TextureEntry, tec.packed_buffer, 0, block_num, LLTEContents::MAX_TE_BUFFER); } - tec.face_count = getNumTEs(); + tec.face_count = llmin((U32)getNumTEs(),LLTEContents::MAX_TES); U8 *cur_ptr = tec.packed_buffer; cur_ptr += unpackTEField(cur_ptr, tec.packed_buffer+tec.size, (U8 *)tec.image_data, 16, tec.face_count, MVT_LLUUID); -- cgit v1.2.3