without checkinig first whether it has something to deflate. (currently
this causes deflate to generate a fatal error according to the zlib spec).
PR 22259.
PR:
Obtained from:
Submitted by:
Reviewed by:
git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@100966
13f79535-47bb-0310-9956-
ffa450edef68
[Remove entries to the current 2.0 section below, when backported]
+ *) Fix bug in mod_deflate, which was passing calling deflate()
+ without checkinig first whether it has something to deflate. (currently
+ this causes deflate to generate a fatal error according to the zlib spec).
+ PR 22259. [Stas Bekman]
+
*) Avoid an infinite recursion, which occured if the name of an included
config file or directory contained a wildcard character. PR 22194.
[André Malo]
if (APR_BUCKET_IS_FLUSH(e)) {
apr_bucket *bkt;
apr_status_t rv;
-
- zRC = deflate(&(ctx->stream), Z_SYNC_FLUSH);
- if (zRC != Z_OK) {
- return APR_EGENERAL;
+ if (ctx->stream.avail_in > 0) {
+ zRC = deflate(&(ctx->stream), Z_SYNC_FLUSH);
+ if (zRC != Z_OK) {
+ return APR_EGENERAL;
+ }
}
ctx->stream.next_out = ctx->buffer;