]> git.lizzy.rs Git - zlib.git/commit
Use post-increment only in inffast.c.
authorMark Adler <madler@alumni.caltech.edu>
Thu, 22 Sep 2016 05:25:21 +0000 (22:25 -0700)
committerMark Adler <madler@alumni.caltech.edu>
Thu, 22 Sep 2016 05:51:15 +0000 (22:51 -0700)
commit9aaec95e82117c1cb0f9624264c3618fc380cecb
treee2911e6cc7351c0c0b44017a5089c66101daa00c
parent3fb251b363866417122fe54a158a1ac5a7837101
Use post-increment only in inffast.c.

An old inffast.c optimization turns out to not be optimal anymore
with modern compilers, and furthermore was not compliant with the
C standard, for which decrementing a pointer before its allocated
memory is undefined. Per the recommendation of a security audit of
the zlib code by Trail of Bits and TrustInSoft, in support of the
Mozilla Foundation, this "optimization" was removed, in order to
avoid the possibility of undefined behavior.
inffast.c