Commit 999623f1 authored by Ruediger Pluem's avatar Ruediger Pluem
Browse files

* Ensure that we do not perform our final operations twice if a second EOS

  falls down the chain by accident. Otherwise we are likely to run in a
  SEGFAULT. So remove ourselves from the chain.


git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@475406 13f79535-47bb-0310-9956-ffa450edef68
parent 66e7a6e1
Loading
Loading
Loading
Loading
+6 −0
Changes for modules/filters/mod_deflate.c: 6 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -1001,6 +1001,12 @@ static apr_status_t inflate_out_filter(ap_filter_t *f,
        e = APR_BRIGADE_FIRST(bb);

        if (APR_BUCKET_IS_EOS(e)) {
            /*
             * We are really done now. Ensure that we never return here, even
             * if a second EOS bucket falls down the chain. Thus remove
             * ourselves.
             */
            ap_remove_output_filter(f);
            ctx->stream.avail_in = 0; /* should be zero already anyway */
            /*
             * Flush the remaining data from the zlib buffers. It is correct