]> granicus.if.org Git - apache/commitdiff
An unambigous cast, if limit is <0 it's unlimited.
authorWilliam A. Rowe Jr <wrowe@apache.org>
Thu, 12 Jan 2006 19:14:28 +0000 (19:14 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Thu, 12 Jan 2006 19:14:28 +0000 (19:14 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@368443 13f79535-47bb-0310-9956-ffa450edef68

server/protocol.c

index 1d3ea7fe944dde8c38a3ef2c08d02fa1319ca04a..27aa975561cf47b82ef9d9c81bf508b9554a9590 100644 (file)
@@ -704,8 +704,9 @@ static apr_status_t process_request_line(request_rec *r, char *line,
                 else {
                     apr_size_t pending_len = strlen(r->pending_header_line);
                     apr_size_t fold_len = strlen(line);
-                    if (pending_len + fold_len >
-                        r->server->limit_req_fieldsize) {
+                    if ((r->server->limit_req_fieldsize > 0)
+                                               && (pending_len + fold_len >
+                               (apr_size_t) r->server->limit_req_fieldsize)) {
                         /* CVE-2004-0942 */
                         r->status = HTTP_BAD_REQUEST;
                         return APR_ENOSPC;