]> git.ipfire.org Git - thirdparty/zlib-ng.git/commit
Fixed regression introduced by inlining CRC + copy
authorAdam Stylinski <kungfujesus06@gmail.com>
Wed, 27 Apr 2022 01:53:30 +0000 (21:53 -0400)
committerHans Kristian Rosbach <hk-github@circlestorm.org>
Fri, 29 Apr 2022 09:10:58 +0000 (11:10 +0200)
commit84f116a3d782b39047b666bc6804e2c0c2138e6d
tree9088469a3f0e0f90770c51359de20e5d891018ef
parentc592b1b33206be038a2de95577c29d28d4e76526
Fixed regression introduced by inlining CRC + copy

Pretty much every time updatewindow has been called, implicitly a
checksum was performed unless on s/390 or state->wrap & 4 == 0. The
inflateSetDictionary function instead separately calls this checksum
before invoking update window and checks the checksum to see if it
matches the initial checksum (a property that happens from parsing the
DICTID section of the headers).

Instead, we can make updatewindow have a "copy" parameter, which is the
state->wrap value that is being checked anyway.  We instead move the 3rd
bit check to be checked by the caller rather than the callee.
inflate.c