From ad94bca0d273869d6358719f4dbd515a905acd26 Mon Sep 17 00:00:00 2001 From: Steven Bennetts Date: Wed, 24 Jan 2007 20:21:23 +0000 Subject: merge -r 56696:57082 Branch_1-13-2 --- indra/newview/llviewerinventory.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'indra/newview/llviewerinventory.cpp') diff --git a/indra/newview/llviewerinventory.cpp b/indra/newview/llviewerinventory.cpp index 9c2638362e..24c230a387 100644 --- a/indra/newview/llviewerinventory.cpp +++ b/indra/newview/llviewerinventory.cpp @@ -430,6 +430,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]; @@ -439,7 +440,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; @@ -472,7 +473,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.2.3