diff options
Diffstat (limited to 'linden/indra/llmath/llvolume.cpp')
-rw-r--r-- | linden/indra/llmath/llvolume.cpp | 18 |
1 files changed, 15 insertions, 3 deletions
diff --git a/linden/indra/llmath/llvolume.cpp b/linden/indra/llmath/llvolume.cpp index 5764c38..c0a33c7 100644 --- a/linden/indra/llmath/llvolume.cpp +++ b/linden/indra/llmath/llvolume.cpp | |||
@@ -750,7 +750,11 @@ BOOL LLProfileParams::importFile(FILE *fp) | |||
750 | 750 | ||
751 | while (!feof(fp)) | 751 | while (!feof(fp)) |
752 | { | 752 | { |
753 | fgets(buffer, BUFSIZE, fp); | 753 | if (fgets(buffer, BUFSIZE, fp) == NULL) |
754 | { | ||
755 | buffer[0] = '\0'; | ||
756 | } | ||
757 | |||
754 | sscanf( /* Flawfinder: ignore */ | 758 | sscanf( /* Flawfinder: ignore */ |
755 | buffer, | 759 | buffer, |
756 | " %255s %255s", | 760 | " %255s %255s", |
@@ -1251,7 +1255,11 @@ BOOL LLPathParams::importFile(FILE *fp) | |||
1251 | 1255 | ||
1252 | while (!feof(fp)) | 1256 | while (!feof(fp)) |
1253 | { | 1257 | { |
1254 | fgets(buffer, BUFSIZE, fp); | 1258 | if (fgets(buffer, BUFSIZE, fp) == NULL) |
1259 | { | ||
1260 | buffer[0] = '\0'; | ||
1261 | } | ||
1262 | |||
1255 | sscanf( /* Flawfinder: ignore */ | 1263 | sscanf( /* Flawfinder: ignore */ |
1256 | buffer, | 1264 | buffer, |
1257 | " %255s %255s", | 1265 | " %255s %255s", |
@@ -3582,7 +3590,11 @@ BOOL LLVolumeParams::importFile(FILE *fp) | |||
3582 | 3590 | ||
3583 | while (!feof(fp)) | 3591 | while (!feof(fp)) |
3584 | { | 3592 | { |
3585 | fgets(buffer, BUFSIZE, fp); | 3593 | if (fgets(buffer, BUFSIZE, fp) == NULL) |
3594 | { | ||
3595 | buffer[0] = '\0'; | ||
3596 | } | ||
3597 | |||
3586 | sscanf(buffer, " %255s", keyword); /* Flawfinder: ignore */ | 3598 | sscanf(buffer, " %255s", keyword); /* Flawfinder: ignore */ |
3587 | if (!strcmp("{", keyword)) | 3599 | if (!strcmp("{", keyword)) |
3588 | { | 3600 | { |