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/llmath/llmath.h | 3 +++ indra/llmath/llvolume.cpp | 18 +++++++++++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) (limited to 'indra/llmath') diff --git a/indra/llmath/llmath.h b/indra/llmath/llmath.h index 5fd365086f..5fa74f30f2 100644 --- a/indra/llmath/llmath.h +++ b/indra/llmath/llmath.h @@ -22,6 +22,9 @@ #elif (LL_LINUX && __GNUC__ <= 2) #define llisnan(val) isnan(val) #define llfinite(val) isfinite(val) +#elif LL_SOLARIS +#define llisnan(val) isnan(val) +#define llfinite(val) (val <= std::numeric_limits::max()) #else #define llisnan(val) std::isnan(val) #define llfinite(val) std::isfinite(val) diff --git a/indra/llmath/llvolume.cpp b/indra/llmath/llvolume.cpp index 67ffb6d628..7345dabf72 100644 --- a/indra/llmath/llvolume.cpp +++ b/indra/llmath/llvolume.cpp @@ -730,7 +730,11 @@ BOOL LLProfileParams::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", @@ -1231,7 +1235,11 @@ BOOL LLPathParams::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", @@ -3562,7 +3570,11 @@ BOOL LLVolumeParams::importFile(FILE *fp) while (!feof(fp)) { - fgets(buffer, BUFSIZE, fp); + if (fgets(buffer, BUFSIZE, fp) == NULL) + { + buffer[0] = '\0'; + } + sscanf(buffer, " %255s", keyword); /* Flawfinder: ignore */ if (!strcmp("{", keyword)) { -- cgit v1.2.3