From d373dcc7cbed5fdea72c6b71a5594e4e85549b43 Mon Sep 17 00:00:00 2001 From: Don Kjer Date: Fri, 20 Jul 2007 20:38:05 +0000 Subject: svn merge -r 64548:64837 svn+ssh://svn/svn/linden/branches/maintenance into release * WARNING *: maintenance r64837 is not the last rev to use in the next merge. use r65269 --- indra/llinventory/llinventory.cpp | 12 ++++++++++-- indra/llinventory/llpermissions.cpp | 6 +++++- indra/llinventory/llsaleinfo.cpp | 6 +++++- 3 files changed, 20 insertions(+), 4 deletions(-) (limited to 'indra/llinventory') 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", diff --git a/indra/llinventory/llpermissions.cpp b/indra/llinventory/llpermissions.cpp index e0e8036d42..18faefe180 100644 --- a/indra/llinventory/llpermissions.cpp +++ b/indra/llinventory/llpermissions.cpp @@ -506,7 +506,11 @@ BOOL LLPermissions::importFile(FILE* fp) while (!feof(fp)) { - fgets(buffer, BUFSIZE, fp); + if (fgets(buffer, BUFSIZE, fp) == NULL) + { + buffer[0] = '\0'; + } + sscanf( /* Flawfinder: ignore */ buffer, " %255s %255s", diff --git a/indra/llinventory/llsaleinfo.cpp b/indra/llinventory/llsaleinfo.cpp index 32ba4aaaec..fa03961e9c 100644 --- a/indra/llinventory/llsaleinfo.cpp +++ b/indra/llinventory/llsaleinfo.cpp @@ -150,7 +150,11 @@ BOOL LLSaleInfo::importFile(FILE* fp, BOOL& has_perm_mask, U32& perm_mask) valuestr[0] = '\0'; while(success && (!feof(fp))) { - fgets(buffer, MAX_STRING, fp); + if (fgets(buffer, MAX_STRING, fp) == NULL) + { + buffer[0] = '\0'; + } + sscanf( /* Flawfinder: ignore */ buffer, " %254s %254s", -- cgit v1.3