]> granicus.if.org Git - apache/commitdiff
* Ensure that we do not try to inflate validation data or garbage data. None
authorRuediger Pluem <rpluem@apache.org>
Wed, 15 Nov 2006 20:19:37 +0000 (20:19 +0000)
committerRuediger Pluem <rpluem@apache.org>
Wed, 15 Nov 2006 20:19:37 +0000 (20:19 +0000)
  of this is zlib's business.

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@475403 13f79535-47bb-0310-9956-ffa450edef68

modules/filters/mod_deflate.c

index 9cdb2c27779b24889c7429f39319a4fd4f83c601..008042432120ff0c5cb3dd292ea7a536ccab5b69 100644 (file)
@@ -1144,6 +1144,14 @@ static apr_status_t inflate_out_filter(ap_filter_t *f,
                               "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;