]> git.ipfire.org Git - thirdparty/apache/httpd.git/commitdiff
mod_deflate: follows up r1572896.
authorYann Ylavic <ylavic@apache.org>
Fri, 28 Feb 2014 10:42:47 +0000 (10:42 +0000)
committerYann Ylavic <ylavic@apache.org>
Fri, 28 Feb 2014 10:42:47 +0000 (10:42 +0000)
Be safe from successive or post end-of-stream flush buckets.

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

modules/filters/mod_deflate.c

index b7d0d666c4d14b5e60565735d9f5eab54b9f8f4b..b8c982babefc2e24a0b94a7acb37a51b0ae6f80e 100644 (file)
@@ -1522,8 +1522,10 @@ static apr_status_t inflate_out_filter(ap_filter_t *f,
             zRC = flush_libz_buffer(ctx, c, f->c->bucket_alloc, inflate,
                                     Z_SYNC_FLUSH, UPDATE_CRC);
             if (zRC == Z_STREAM_END) {
-                ctx->validation_buffer = apr_pcalloc(f->r->pool,
-                                                     VALIDATION_SIZE);
+                if (ctx->validation_buffer == NULL) {
+                    ctx->validation_buffer = apr_pcalloc(f->r->pool,
+                                                         VALIDATION_SIZE);
+                }
             }
             else if (zRC != Z_OK) {
                 ap_log_rerror(APLOG_MARK, APLOG_ERR, 0, r, APLOGNO(01402)