From 9b4f54c826ffa4f94efa866068c9d6ecdfb4b424 Mon Sep 17 00:00:00 2001 From: Jacek Antonelli Date: Fri, 15 Aug 2008 23:44:48 -0500 Subject: Second Life viewer sources 1.13.2.15 --- linden/indra/newview/llviewerinventory.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'linden/indra/newview/llviewerinventory.cpp') diff --git a/linden/indra/newview/llviewerinventory.cpp b/linden/indra/newview/llviewerinventory.cpp index 1ed6525..487a9f8 100644 --- a/linden/indra/newview/llviewerinventory.cpp +++ b/linden/indra/newview/llviewerinventory.cpp @@ -449,6 +449,7 @@ bool LLViewerInventoryCategory::fetchDescendents() bool LLViewerInventoryCategory::importFileLocal(FILE* fp) { + // *NOTE: This buffer size is hard coded into scanf() below. char buffer[MAX_STRING]; char keyword[MAX_STRING]; char valuestr[MAX_STRING]; @@ -458,7 +459,7 @@ bool LLViewerInventoryCategory::importFileLocal(FILE* fp) while(!feof(fp)) { fgets(buffer, MAX_STRING, fp); - sscanf(buffer, " %s %s", keyword, valuestr); + sscanf(buffer, " %254s %254s", keyword, valuestr); if(!keyword) { continue; @@ -491,7 +492,7 @@ bool LLViewerInventoryCategory::importFileLocal(FILE* fp) { //strcpy(valuestr, buffer + strlen(keyword) + 3); // *NOTE: Not ANSI C, but widely supported. - sscanf(buffer, " %s %[^|]", keyword, valuestr); + sscanf(buffer, " %254s %254[^|]", keyword, valuestr); mName.assign(valuestr); LLString::replaceNonstandardASCII(mName, ' '); LLString::replaceChar(mName, '|', ' '); -- cgit v1.1