diff options
Diffstat (limited to 'indra/llinventory/llinventory.cpp')
-rw-r--r-- | indra/llinventory/llinventory.cpp | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/indra/llinventory/llinventory.cpp b/indra/llinventory/llinventory.cpp index 36b7ab0680..60c1ade38f 100644 --- a/indra/llinventory/llinventory.cpp +++ b/indra/llinventory/llinventory.cpp @@ -515,7 +515,11 @@ BOOL LLInventoryItem::importFile(FILE* fp) mAssetUUID.setNull(); while(success && (!feof(fp))) { - fgets(buffer, MAX_STRING, fp); + if (fgets(buffer, MAX_STRING, fp) == NULL) + { + buffer[0] = '\0'; + } + sscanf(buffer, " %254s %254s", keyword, valuestr); /* Flawfinder: ignore */ if(0 == strcmp("{",keyword)) { @@ -1371,7 +1375,11 @@ BOOL LLInventoryCategory::importFile(FILE* fp) valuestr[0] = '\0'; while(!feof(fp)) { - fgets(buffer, MAX_STRING, fp); + if (fgets(buffer, MAX_STRING, fp) == NULL) + { + buffer[0] = '\0'; + } + sscanf( /* Flawfinder: ignore */ buffer, " %254s %254s", |