You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Jeff Trawick <tr...@attglobal.net> on 2002/05/29 15:44:21 UTC
[PATCH] fix mod_deflate uninitialized var
I assume this is a real problem?
mod_deflate.c: In function `deflate_in_filter':
mod_deflate.c:533: warning: `zRC' might be used uninitialized in this function
Index: modules/filters/mod_deflate.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/filters/mod_deflate.c,v
retrieving revision 1.10
diff -u -r1.10 mod_deflate.c
--- modules/filters/mod_deflate.c 29 May 2002 10:27:05 -0000 1.10
+++ modules/filters/mod_deflate.c 29 May 2002 13:38:57 -0000
@@ -669,6 +669,10 @@
ctx->stream.next_in = (unsigned char *)data;
ctx->stream.avail_in = len;
+ /* make sure we don't get a false match on Z_STREAM_END
+ * if we skip the loop
+ */
+ zRC = Z_STREAM_END + 1;
while (ctx->stream.avail_in != 0) {
if (ctx->stream.avail_out == 0) {
apr_bucket *tmp_heap;
--
Jeff Trawick | trawick@attglobal.net
Born in Roswell... married an alien...