]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
Don't allow a negative value to sneak through
authorJim Jagielski <jim@apache.org>
Tue, 9 Jul 2002 15:26:26 +0000 (15:26 +0000)
committerJim Jagielski <jim@apache.org>
Tue, 9 Jul 2002 15:26:26 +0000 (15:26 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@95987 13f79535-47bb-0310-9956-ffa450edef68

src/main/http_protocol.c

index 99a385e8b800b875f89c11527cf580ed4f1bc375..2a9e80813a34c65cea9083113aa8070dcbce536a 100644 (file)
@@ -2024,7 +2024,7 @@ API_EXPORT(int) ap_setup_client_block(request_rec *r, int read_policy)
             char *endstr;
             errno = 0;
             r->remaining = ap_strtol(lenp, &endstr, 10);
-            if (errno || (endstr && *endstr)) {
+            if (errno || (endstr && *endstr) || (r->remaining < 0)) {
                 conversion_error = 1;
             }
         }