]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Author: Francesco Chemolli <kinkie@squid-cache.org>
authorAmos Jeffries <squid3@treenet.co.nz>
Tue, 27 Oct 2009 05:51:14 +0000 (18:51 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Tue, 27 Oct 2009 05:51:14 +0000 (18:51 +1300)
Bug 2794: ESI parsing fails on FreeBSD

Fix bug in the ESI expression parser which prevented it from working properly on
non-glibc platforms.

src/ESIExpression.cc

index 1607a3eff41144787699e4b36dd8c5fa3a8f5b4d..6d370c8c7cc364a973e4d4f486ba4cc2c4b1fa20 100644 (file)
@@ -721,6 +721,7 @@ getsymbol (const char *s, char const **endptr)
 
         if ((point = strchr (s, '.')) && point - s < (ssize_t)length) {
             /* floating point */
+            errno=0; /* reset errno */
             rv.value.floating = strtod (s, &end);
 
             if (s == end || errno) {
@@ -737,6 +738,7 @@ getsymbol (const char *s, char const **endptr)
             }
         } else {
             /* INT */
+            errno=0; /* reset errno */
             rv.value.integral = strtol (s, &end, 0);
 
             if (s == end || errno) {