From: William A. Rowe Jr Date: Thu, 12 Jan 2006 19:14:28 +0000 (+0000) Subject: An unambigous cast, if limit is <0 it's unlimited. X-Git-Tag: 2.3.0~2618 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=144837a6a61cc25ff6e432595765148fc357a8e6;p=apache An unambigous cast, if limit is <0 it's unlimited. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@368443 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/protocol.c b/server/protocol.c index 1d3ea7fe94..27aa975561 100644 --- a/server/protocol.c +++ b/server/protocol.c @@ -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;