From: William A. Rowe Jr Date: Thu, 11 Apr 2002 03:56:26 +0000 (+0000) Subject: First, use addition to test against an unsigned for chunk_start after X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5321cd58ae269fb31d296e380854b0c093ccfbc5;p=thirdparty%2Fapache%2Fhttpd.git First, use addition to test against an unsigned for chunk_start after we are certain chunk_start is a positive value. Second, ap_bread is prototyped as an -int- ... not a size_t, not an off_t. These changes eliminate all mismatch type/sign errors on Win32. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/1.3.x@94600 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/modules/proxy/proxy_util.c b/src/modules/proxy/proxy_util.c index f138aaea567..1c43bc21bdf 100644 --- a/src/modules/proxy/proxy_util.c +++ b/src/modules/proxy/proxy_util.c @@ -525,7 +525,7 @@ long int ap_proxy_send_fb(BUFF *f, request_rec *r, cache_req *c, off_t len, int if (remaining == 0) { /* get the chunk size from the stream */ chunk_start = ap_getline(buf, buf_size, f, 0); - if ((chunk_start <= 0) || (chunk_start >= (buf_size - 1)) || !ap_isxdigit(*buf)) { + if ((chunk_start <= 0) || ((size_t)chunk_start + 1 >= buf_size) || !ap_isxdigit(*buf)) { n = -1; } /* parse the chunk size */ @@ -544,7 +544,7 @@ long int ap_proxy_send_fb(BUFF *f, request_rec *r, cache_req *c, off_t len, int /* read the chunk */ if (remaining > 0) { - n = ap_bread(f, buf, MIN((off_t)buf_size, remaining)); + n = ap_bread(f, buf, MIN((int)buf_size, (int)remaining)); if (n > -1) { remaining -= n; } @@ -572,7 +572,8 @@ long int ap_proxy_send_fb(BUFF *f, request_rec *r, cache_req *c, off_t len, int n = ap_bread(f, buf, buf_size); } else { - n = ap_bread(f, buf, MIN((off_t)buf_size, len - total_bytes_rcvd)); + n = ap_bread(f, buf, MIN((int)buf_size, + (int)(len - total_bytes_rcvd))); } }