summaryrefslogtreecommitdiff
path: root/indra/newview/llviewerinventory.cpp
diff options
context:
space:
mode:
authorSteven Bennetts <steve@lindenlab.com>2007-01-24 20:21:23 +0000
committerSteven Bennetts <steve@lindenlab.com>2007-01-24 20:21:23 +0000
commitad94bca0d273869d6358719f4dbd515a905acd26 (patch)
tree52ae9f056f3dd6a938434d45d5295aef87e77e0a /indra/newview/llviewerinventory.cpp
parent787ac69d75dbbd8ad79c32a5de54603351523eae (diff)
merge -r 56696:57082 Branch_1-13-2
Diffstat (limited to 'indra/newview/llviewerinventory.cpp')
-rw-r--r--indra/newview/llviewerinventory.cpp5
1 files changed, 3 insertions, 2 deletions
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, '|', ' ');