From: Jim Jagielski Date: Mon, 19 Aug 2002 21:39:28 +0000 (+0000) Subject: Boundary condition: correctly mark the 1st char X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cb1fed64ce6ac6513dfd99c0eb593608b97fd209;p=thirdparty%2Fapache%2Fhttpd.git Boundary condition: correctly mark the 1st char 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 --- diff --git a/src/ap/ap_strtol.c b/src/ap/ap_strtol.c index 6c59073baa4..ce46c44c6e0 100644 --- a/src/ap/ap_strtol.c +++ b/src/ap/ap_strtol.c @@ -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;