From 5c3c8916e0c6d1bd333c33d758be657bbe2295b5 Mon Sep 17 00:00:00 2001 From: Ruediger Pluem Date: Wed, 15 Nov 2006 20:19:37 +0000 Subject: [PATCH] * 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 --- modules/filters/mod_deflate.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/filters/mod_deflate.c b/modules/filters/mod_deflate.c index 9cdb2c2777..0080424321 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; -- 2.49.0