aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llviewerinventory.cpp
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:44:48 -0500
committerJacek Antonelli2008-08-15 23:44:48 -0500
commit9b4f54c826ffa4f94efa866068c9d6ecdfb4b424 (patch)
tree2f8ae193ab487088962e628f1ee9dee2f5901f01 /linden/indra/newview/llviewerinventory.cpp
parentSecond Life viewer sources 1.13.2.12 (diff)
downloadmeta-impy-9b4f54c826ffa4f94efa866068c9d6ecdfb4b424.zip
meta-impy-9b4f54c826ffa4f94efa866068c9d6ecdfb4b424.tar.gz
meta-impy-9b4f54c826ffa4f94efa866068c9d6ecdfb4b424.tar.bz2
meta-impy-9b4f54c826ffa4f94efa866068c9d6ecdfb4b424.tar.xz
Second Life viewer sources 1.13.2.15
Diffstat (limited to 'linden/indra/newview/llviewerinventory.cpp')
-rw-r--r--linden/indra/newview/llviewerinventory.cpp5
1 files changed, 3 insertions, 2 deletions
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()
449 449
450bool LLViewerInventoryCategory::importFileLocal(FILE* fp) 450bool LLViewerInventoryCategory::importFileLocal(FILE* fp)
451{ 451{
452 // *NOTE: This buffer size is hard coded into scanf() below.
452 char buffer[MAX_STRING]; 453 char buffer[MAX_STRING];
453 char keyword[MAX_STRING]; 454 char keyword[MAX_STRING];
454 char valuestr[MAX_STRING]; 455 char valuestr[MAX_STRING];
@@ -458,7 +459,7 @@ bool LLViewerInventoryCategory::importFileLocal(FILE* fp)
458 while(!feof(fp)) 459 while(!feof(fp))
459 { 460 {
460 fgets(buffer, MAX_STRING, fp); 461 fgets(buffer, MAX_STRING, fp);
461 sscanf(buffer, " %s %s", keyword, valuestr); 462 sscanf(buffer, " %254s %254s", keyword, valuestr);
462 if(!keyword) 463 if(!keyword)
463 { 464 {
464 continue; 465 continue;
@@ -491,7 +492,7 @@ bool LLViewerInventoryCategory::importFileLocal(FILE* fp)
491 { 492 {
492 //strcpy(valuestr, buffer + strlen(keyword) + 3); 493 //strcpy(valuestr, buffer + strlen(keyword) + 3);
493 // *NOTE: Not ANSI C, but widely supported. 494 // *NOTE: Not ANSI C, but widely supported.
494 sscanf(buffer, " %s %[^|]", keyword, valuestr); 495 sscanf(buffer, " %254s %254[^|]", keyword, valuestr);
495 mName.assign(valuestr); 496 mName.assign(valuestr);
496 LLString::replaceNonstandardASCII(mName, ' '); 497 LLString::replaceNonstandardASCII(mName, ' ');
497 LLString::replaceChar(mName, '|', ' '); 498 LLString::replaceChar(mName, '|', ' ');