Commit 66e7a6e1 authored by Ruediger Pluem's avatar Ruediger Pluem
Browse files

* 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
parent e500f71d
Loading
Loading
Loading
Loading
+8 −0
Changes for modules/filters/mod_deflate.c: 8 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -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;