From: Ruediger Pluem Date: Wed, 15 Nov 2006 20:19:37 +0000 (+0000) Subject: * Ensure that we do not try to inflate validation data or garbage data. None X-Git-Tag: 2.3.0~2024 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5c3c8916e0c6d1bd333c33d758be657bbe2295b5;p=thirdparty%2Fapache%2Fhttpd.git * Ensure that we do not try to inflate validation data or garbage data. None of this is zlib's business. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@475403 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/modules/filters/mod_deflate.c b/modules/filters/mod_deflate.c index 9cdb2c27779..00804243212 100644 --- a/modules/filters/mod_deflate.c +++ b/modules/filters/mod_deflate.c @@ -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;