From d3c91698bf7c02af3210d4893fe7b57572860bec Mon Sep 17 00:00:00 2001 From: Shyotl Date: Thu, 21 Apr 2011 00:17:10 -0500 Subject: [PATCH] Removed crash vulnerability to malevolently malformed notecards. --- indra/llinventory/llnotecard.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indra/llinventory/llnotecard.cpp b/indra/llinventory/llnotecard.cpp index 9e7e04376..c112d18d2 100644 --- a/indra/llinventory/llnotecard.cpp +++ b/indra/llinventory/llnotecard.cpp @@ -203,7 +203,7 @@ bool LLNotecard::importStream(std::istream& str) return FALSE; } - if(text_len > mMaxText) + if(text_len < 0 || text_len > mMaxText) { llwarns << "Invalid Linden text length: " << text_len << llendl; return FALSE;