httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rpl...@apache.org
Subject svn commit: r475403 - /httpd/httpd/trunk/modules/filters/mod_deflate.c
Date Wed, 15 Nov 2006 20:19:37 GMT
Author: rpluem
Date: Wed Nov 15 12:19:37 2006
New Revision: 475403

URL: http://svn.apache.org/viewvc?view=rev&rev=475403
Log:
* Ensure that we do not try to inflate validation data or garbage data. None
  of this is zlib's business.

Modified:
    httpd/httpd/trunk/modules/filters/mod_deflate.c

Modified: httpd/httpd/trunk/modules/filters/mod_deflate.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/filters/mod_deflate.c?view=diff&rev=475403&r1=475402&r2=475403
==============================================================================
--- httpd/httpd/trunk/modules/filters/mod_deflate.c (original)
+++ httpd/httpd/trunk/modules/filters/mod_deflate.c Wed Nov 15 12:19:37 2006
@@ -1144,6 +1144,14 @@
                               "Zlib: %d bytes of garbage at the end of "
                               "compressed stream.", ctx->stream.avail_in);
             }
+            /*
+             * There is nothing worth consuming for zlib left, because it is
+             * either garbage data or the data has been copied to the
+             * validation buffer (processing validation data is no business for
+             * zlib). So set ctx->stream.avail_in to zero to indicate this to
+             * the following while loop.
+             */
+            ctx->stream.avail_in = 0;
         }
 
         zRC = Z_OK;



Mime
View raw message