diff options
Diffstat (limited to 'linden/indra/llinventory')
-rw-r--r-- | linden/indra/llinventory/llinventory.cpp | 12 | ||||
-rw-r--r-- | linden/indra/llinventory/llpermissions.cpp | 6 | ||||
-rw-r--r-- | linden/indra/llinventory/llsaleinfo.cpp | 6 |
3 files changed, 20 insertions, 4 deletions
diff --git a/linden/indra/llinventory/llinventory.cpp b/linden/indra/llinventory/llinventory.cpp index 93c480e..3800de2 100644 --- a/linden/indra/llinventory/llinventory.cpp +++ b/linden/indra/llinventory/llinventory.cpp | |||
@@ -535,7 +535,11 @@ BOOL LLInventoryItem::importFile(FILE* fp) | |||
535 | mAssetUUID.setNull(); | 535 | mAssetUUID.setNull(); |
536 | while(success && (!feof(fp))) | 536 | while(success && (!feof(fp))) |
537 | { | 537 | { |
538 | fgets(buffer, MAX_STRING, fp); | 538 | if (fgets(buffer, MAX_STRING, fp) == NULL) |
539 | { | ||
540 | buffer[0] = '\0'; | ||
541 | } | ||
542 | |||
539 | sscanf(buffer, " %254s %254s", keyword, valuestr); /* Flawfinder: ignore */ | 543 | sscanf(buffer, " %254s %254s", keyword, valuestr); /* Flawfinder: ignore */ |
540 | if(0 == strcmp("{",keyword)) | 544 | if(0 == strcmp("{",keyword)) |
541 | { | 545 | { |
@@ -1391,7 +1395,11 @@ BOOL LLInventoryCategory::importFile(FILE* fp) | |||
1391 | valuestr[0] = '\0'; | 1395 | valuestr[0] = '\0'; |
1392 | while(!feof(fp)) | 1396 | while(!feof(fp)) |
1393 | { | 1397 | { |
1394 | fgets(buffer, MAX_STRING, fp); | 1398 | if (fgets(buffer, MAX_STRING, fp) == NULL) |
1399 | { | ||
1400 | buffer[0] = '\0'; | ||
1401 | } | ||
1402 | |||
1395 | sscanf( /* Flawfinder: ignore */ | 1403 | sscanf( /* Flawfinder: ignore */ |
1396 | buffer, | 1404 | buffer, |
1397 | " %254s %254s", | 1405 | " %254s %254s", |
diff --git a/linden/indra/llinventory/llpermissions.cpp b/linden/indra/llinventory/llpermissions.cpp index ae4360a..925b68f 100644 --- a/linden/indra/llinventory/llpermissions.cpp +++ b/linden/indra/llinventory/llpermissions.cpp | |||
@@ -526,7 +526,11 @@ BOOL LLPermissions::importFile(FILE* fp) | |||
526 | 526 | ||
527 | while (!feof(fp)) | 527 | while (!feof(fp)) |
528 | { | 528 | { |
529 | fgets(buffer, BUFSIZE, fp); | 529 | if (fgets(buffer, BUFSIZE, fp) == NULL) |
530 | { | ||
531 | buffer[0] = '\0'; | ||
532 | } | ||
533 | |||
530 | sscanf( /* Flawfinder: ignore */ | 534 | sscanf( /* Flawfinder: ignore */ |
531 | buffer, | 535 | buffer, |
532 | " %255s %255s", | 536 | " %255s %255s", |
diff --git a/linden/indra/llinventory/llsaleinfo.cpp b/linden/indra/llinventory/llsaleinfo.cpp index debb092..0258259 100644 --- a/linden/indra/llinventory/llsaleinfo.cpp +++ b/linden/indra/llinventory/llsaleinfo.cpp | |||
@@ -170,7 +170,11 @@ BOOL LLSaleInfo::importFile(FILE* fp, BOOL& has_perm_mask, U32& perm_mask) | |||
170 | valuestr[0] = '\0'; | 170 | valuestr[0] = '\0'; |
171 | while(success && (!feof(fp))) | 171 | while(success && (!feof(fp))) |
172 | { | 172 | { |
173 | fgets(buffer, MAX_STRING, fp); | 173 | if (fgets(buffer, MAX_STRING, fp) == NULL) |
174 | { | ||
175 | buffer[0] = '\0'; | ||
176 | } | ||
177 | |||
174 | sscanf( /* Flawfinder: ignore */ | 178 | sscanf( /* Flawfinder: ignore */ |
175 | buffer, | 179 | buffer, |
176 | " %254s %254s", | 180 | " %254s %254s", |