summaryrefslogtreecommitdiffstats
path: root/generic/tclZlib.c
diff options
context:
space:
mode:
authoraspect <aspect+tclcore@abstracted-spleen.org>2017-02-11 05:06:43 (GMT)
committeraspect <aspect+tclcore@abstracted-spleen.org>2017-02-11 05:06:43 (GMT)
commitf76fe71e68ec63ca5fd7068025e772ffdf758789 (patch)
tree46b270062bcf137bb51ad8d346512637a48bd515 /generic/tclZlib.c
parent9b8fe92d1ec10b1010d91d504deab315538cce0e (diff)
downloadtcl-f76fe71e68ec63ca5fd7068025e772ffdf758789.zip
tcl-f76fe71e68ec63ca5fd7068025e772ffdf758789.tar.gz
tcl-f76fe71e68ec63ca5fd7068025e772ffdf758789.tar.bz2
zlib stream finalize calls deflate with no input - this case (and this case
only) must be allowed. Fixes 2nd issue in [25842c161f], introduced by [c1aff52ef3]
Diffstat (limited to 'generic/tclZlib.c')
-rw-r--r--generic/tclZlib.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tclZlib.c b/generic/tclZlib.c
index e5a5946..82486d2 100644
--- a/generic/tclZlib.c
+++ b/generic/tclZlib.c
@@ -1204,10 +1204,10 @@ Tcl_ZlibStreamPut(
zshPtr->stream.avail_in = size;
/*
- * Must not do a zero-length compress. [Bug 25842c161]
+ * Must not do a zero-length compress unless finalizing. [Bug 25842c161]
*/
- if (size == 0) {
+ if (size == 0 && flush != Z_FINISH) {
return TCL_OK;
}