From: Yann Ylavic Date: Fri, 28 Feb 2014 10:42:47 +0000 (+0000) Subject: mod_deflate: follows up r1572896. X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2e830b9d3635d2b8ce0ad9c4170d5aa0a0bab196;p=thirdparty%2Fapache%2Fhttpd.git mod_deflate: follows up r1572896. 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 --- diff --git a/modules/filters/mod_deflate.c b/modules/filters/mod_deflate.c index b7d0d666c4d..b8c982babef 100644 --- a/modules/filters/mod_deflate.c +++ b/modules/filters/mod_deflate.c @@ -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)