projects
/
tools
/
apitrace.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f6548d1
)
Ignore unexpected end of file in gzread.
author
José Fonseca
<jose.r.fonseca@gmail.com>
Sat, 8 Oct 2011 12:17:55 +0000
(13:17 +0100)
committer
José Fonseca
<jose.r.fonseca@gmail.com>
Sat, 8 Oct 2011 16:13:26 +0000
(17:13 +0100)
zlib-1.2.4 onwards makes it is impossible to read the last block of
incomplete gzip traces without this modification.
thirdparty/zlib/gzread.c
patch
|
blob
|
history
diff --git
a/thirdparty/zlib/gzread.c
b/thirdparty/zlib/gzread.c
index
548201a
..
3a6ba9f
100644
(file)
--- 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 */