]> git.lizzy.rs Git - zlib.git/commit
Don't bother computing check value after successful inflateSync().
authorMark Adler <madler@alumni.caltech.edu>
Thu, 3 Jan 2019 02:10:40 +0000 (18:10 -0800)
committerMark Adler <madler@alumni.caltech.edu>
Thu, 3 Jan 2019 04:40:40 +0000 (20:40 -0800)
commit0d36ec47f310478549c0864f215ab5c0114c49ba
tree19821ce1a005e7a5741b65e27ef6a83d8a7a565f
parent7c0c75e990ca5395139c148f120042048b0ce091
Don't bother computing check value after successful inflateSync().

inflateSync() is used to skip invalid deflate data, which means
that the check value that was being computed is no longer useful.
This commit turns off the check value computation, and furthermore
allows a successful return if the compressed data terminated in a
graceful manner. This commit also fixes a bug in the case that
inflateSync() is used before a header is ever processed. In that
case, there is no knowledge of a trailer, so the remainder is
treated as raw.
inflate.c
inflate.h
test/example.c