]> granicus.if.org Git - apache/commitdiff
Seems like this is the end of the compiler emits on Win32, once again.
authorWilliam A. Rowe Jr <wrowe@apache.org>
Sun, 17 Mar 2002 23:18:10 +0000 (23:18 +0000)
committerWilliam A. Rowe Jr <wrowe@apache.org>
Sun, 17 Mar 2002 23:18:10 +0000 (23:18 +0000)
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93987 13f79535-47bb-0310-9956-ffa450edef68

server/protocol.c

index 593d6de016c459aefc5500f6891976ed4d959fe3..a8c2e725e28507f8e7ad7a600efa310e91dd2209 100644 (file)
@@ -677,8 +677,9 @@ static int read_request_line(request_rec *r)
     /* ap_getline returns (size of max buffer - 1) if it fills up the
      * buffer before finding the end-of-line.  This is only going to
      * happen if it exceeds the configured limit for a request-line.
+     * The cast is safe, limit_req_line cannot be negative
      */
-    if (len > r->server->limit_req_line) {
+    if (len > (apr_size_t)r->server->limit_req_line) {
         r->status    = HTTP_REQUEST_URI_TOO_LARGE;
         r->proto_num = HTTP_VERSION(1,0);
         r->protocol  = apr_pstrdup(r->pool, "HTTP/1.0");
@@ -739,9 +740,11 @@ static void get_mime_headers(request_rec *r)
         /* ap_rgetline returns APR_ENOSPC if it fills up the buffer before
          * finding the end-of-line.  This is only going to happen if it
          * exceeds the configured limit for a field size.
+         * The cast is safe, limit_req_fieldsize cannot be negative
          */
         if (rv == APR_ENOSPC
-            || (rv == APR_SUCCESS && len > r->server->limit_req_fieldsize)) {
+            || (rv == APR_SUCCESS 
+                && len > (apr_size_t)r->server->limit_req_fieldsize)) {
             r->status = HTTP_BAD_REQUEST;
             apr_table_setn(r->notes, "error-notes",
                            apr_pstrcat(r->pool,