Removed crash vulnerability to malevolently malformed notecards.

This commit is contained in:
Shyotl
2011-04-21 00:17:10 -05:00
parent d2291b5903
commit d3c91698bf

View File

@@ -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;