]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
limit_req_fieldsize is signed, correct a signedness error using
authorWilliam A. Rowe Jr <wrowe@apache.org>
Wed, 5 Jan 2005 22:21:56 +0000 (22:21 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Wed, 5 Jan 2005 22:21:56 +0000 (22:21 +0000)
  a cast since it's not possible to have a negative limit.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@124283 13f79535-47bb-0310-9956-ffa450edef68

server/protocol.c

index 49fef829bdcc417537c67732346ef96188cd3513..4355d9fcde16ff955aa541577eb458b959b3fc3b 100644 (file)
@@ -708,7 +708,7 @@ AP_DECLARE(void) ap_get_mime_headers_core(request_rec *r, apr_bucket_brigade *bb
                  */
                 apr_size_t fold_len = last_len + len + 1; /* trailing null */
 
-                if (fold_len > r->server->limit_req_fieldsize + 1) {
+                if (fold_len >= (apr_size_t)(r->server->limit_req_fieldsize)) {
                     r->status = HTTP_BAD_REQUEST;
                     /* report what we have accumulated so far before the
                      * overflow (last_field) as the field with the problem