Actions
Bug #1882
closedSEGV in mod_proxy_backend_http.c: wrong int comparison
ASK QUESTIONS IN Forums:
Description
SEGV in mod_proxy_backend_http.c: wrong int comparison: c->mem->used - 1
is (unsigned) -1
when used == 0
.
Patch:
--- a/src/mod_proxy_backend_http.c Mon Jan 26 22:05:16 2009 +0300 +++ b/src/mod_proxy_backend_http.c Fri Jan 30 18:15:47 2009 +0300 @@ -199,7 +199,7 @@ data->chunk_parse_state = HTTP_CHUNK_END; case HTTP_CHUNK_END: /* discard CRLF.*/ - for(ch = 0; (size_t)(c->offset) < (c->mem->used - 1) && ch != '\n' ;) { + for(ch = 0; (ssize_t)(c->offset) < (ssize_t)(c->mem->used - 1) && ch != '\n' ;) { ch = c->mem->ptr[c->offset]; c->offset++; in->bytes_out++;
Actions
Also available in: Atom