httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From wr...@apache.org
Subject svn commit: r368443 - /httpd/httpd/trunk/server/protocol.c
Date Thu, 12 Jan 2006 19:14:31 GMT
Author: wrowe
Date: Thu Jan 12 11:14:28 2006
New Revision: 368443

URL: http://svn.apache.org/viewcvs?rev=368443&view=rev
Log:

  An unambigous cast, if limit is <0 it's unlimited.

Modified:
    httpd/httpd/trunk/server/protocol.c

Modified: httpd/httpd/trunk/server/protocol.c
URL: http://svn.apache.org/viewcvs/httpd/httpd/trunk/server/protocol.c?rev=368443&r1=368442&r2=368443&view=diff
==============================================================================
--- httpd/httpd/trunk/server/protocol.c (original)
+++ httpd/httpd/trunk/server/protocol.c Thu Jan 12 11:14:28 2006
@@ -704,8 +704,9 @@
                 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;



Mime
View raw message