You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by tr...@apache.org on 2002/11/19 20:32:38 UTC
cvs commit: httpd-2.0/server protocol.c
trawick 2002/11/19 11:32:38
Modified: modules/experimental mod_cache.c
modules/http http_core.c
server protocol.c
Log:
bucket length parameter is apr_size_t, which isn't always signed,
so be careful when comparing with the special value -1
Submitted by: Allan Edwards <ak...@us.ibm.com>
Reviewed by: Jeff Trawick
Revision Changes Path
1.63 +1 -1 httpd-2.0/modules/experimental/mod_cache.c
Index: mod_cache.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/experimental/mod_cache.c,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -r1.62 -r1.63
--- mod_cache.c 6 Nov 2002 14:08:31 -0000 1.62
+++ mod_cache.c 19 Nov 2002 19:32:37 -0000 1.63
@@ -627,7 +627,7 @@
unresolved_length = 1;
continue;
}
- if (e->length < 0) {
+ if (e->length == (apr_size_t)-1) {
break;
}
size += e->length;
1.308 +1 -1 httpd-2.0/modules/http/http_core.c
Index: http_core.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/http/http_core.c,v
retrieving revision 1.307
retrieving revision 1.308
diff -u -r1.307 -r1.308
--- http_core.c 15 Jul 2002 08:05:11 -0000 1.307
+++ http_core.c 19 Nov 2002 19:32:37 -0000 1.308
@@ -167,7 +167,7 @@
if (APR_BUCKET_IS_FLUSH(e)) {
flush = e;
}
- else if (e->length == -1) {
+ else if (e->length == (apr_size_t)-1) {
/* unknown amount of data (e.g. a pipe) */
const char *data;
apr_size_t len;
1.121 +1 -1 httpd-2.0/server/protocol.c
Index: protocol.c
===================================================================
RCS file: /home/cvs/httpd-2.0/server/protocol.c,v
retrieving revision 1.120
retrieving revision 1.121
diff -u -r1.120 -r1.121
--- protocol.c 31 Oct 2002 11:39:36 -0000 1.120
+++ protocol.c 19 Nov 2002 19:32:38 -0000 1.121
@@ -1236,7 +1236,7 @@
eos = 1;
break;
}
- if (e->length == -1) {
+ if (e->length == (apr_size_t)-1) {
apr_size_t len;
const char *ignored;
apr_status_t rv;