Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFilip Navara <filip.navara@gmail.com>2018-08-28 16:36:24 +0300
committerMarek Safar <marek.safar@gmail.com>2018-09-06 19:38:22 +0300
commitc63e12669d6c080dfe37c957f74c20d8b436aa83 (patch)
treec0d66d454fa9d8bb35932eb47103cdcf19a76d2f /support
parentd21d00b366cbf9115248c40bd8c72d4db717fd63 (diff)
Fix DeflateStream handling of zero-length reads from underlying stream.
Diffstat (limited to 'support')
-rw-r--r--support/zlib-helper.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/support/zlib-helper.c b/support/zlib-helper.c
index 9dcebc7e967..e822fe63d88 100644
--- a/support/zlib-helper.c
+++ b/support/zlib-helper.c
@@ -208,7 +208,9 @@ ReadZStream (ZStream *stream, guchar *buffer, gint length)
stream->eof = TRUE;
break;
} else if (status == Z_BUF_ERROR && stream->total_in == zs->total_in) {
- stream->eof = TRUE;
+ if (zs->avail_in != 0) {
+ stream->eof = TRUE;
+ }
break;
} else if (status != Z_OK) {
return status;