]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Boundary condition: correctly mark the 1st char
authorJim Jagielski <jim@apache.org>
Mon, 19 Aug 2002 21:39:28 +0000 (21:39 +0000)
committerJim Jagielski <jim@apache.org>
Mon, 19 Aug 2002 21:39:28 +0000 (21:39 +0000)
that results in the over/underflow

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@96450 13f79535-47bb-0310-9956-ffa450edef68

src/ap/ap_strtol.c

index 6c59073baa4fe75b85e7b1e31707d3adcc1d8a9f..ce46c44c6e0670d0eda617b3a4e92a33f9bee8fe 100644 (file)
@@ -195,9 +195,10 @@ API_EXPORT(long) ap_strtol(const char *nptr, char **endptr, int base)
                        break;
                if (c >= base)
                        break;
-               if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim))
+               if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim)) {
                        any = -1;
-               else {
+                       break;
+               } else {
                        any = 1;
                        acc *= base;
                        acc += c;