summaryrefslogtreecommitdiff
path: root/thirdparty
diff options
context:
space:
mode:
authorJosé Fonseca <jose.r.fonseca@gmail.com>2011-10-08 13:17:55 +0100
committerJosé Fonseca <jose.r.fonseca@gmail.com>2011-10-08 17:13:26 +0100
commit1dc11cd6b5ef9f6a2aede394f60742b76ff830fd (patch)
tree568b81d9d505773bd09b98a1a8b2507ab3aec2e1 /thirdparty
parentf6548d1c7accc959ef53f8c08c1d7a71f94c7f53 (diff)
Ignore unexpected end of file in gzread.
zlib-1.2.4 onwards makes it is impossible to read the last block of incomplete gzip traces without this modification.
Diffstat (limited to 'thirdparty')
-rw-r--r--thirdparty/zlib/gzread.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/thirdparty/zlib/gzread.c b/thirdparty/zlib/gzread.c
index 548201a..3a6ba9f 100644
--- a/thirdparty/zlib/gzread.c
+++ b/thirdparty/zlib/gzread.c
@@ -245,8 +245,14 @@ local int gz_decomp(state)
if (strm->avail_in == 0 && gz_avail(state) == -1)
return -1;
if (strm->avail_in == 0) {
+#if 0
gz_error(state, Z_DATA_ERROR, "unexpected end of file");
return -1;
+#else
+ /* APITRACE: Ignore unexpected end of file. */
+ ret = 0;
+ break;
+#endif
}
/* decompress and handle errors */