Remove offset pointer optimization in inftrees.c.

inftrees.c was subtracting an offset from a pointer to an array,
in order to provide a pointer that allowed indexing starting at
the offset. This is not compliant with the C standard, for which
the behavior of a pointer decremented 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 tiny optimization was removed, in order
to avoid the possibility of undefined behavior.

Upstream-Status: Backport
http://http.debian.net/debian/pool/main/z/zlib/zlib_1.2.8.dfsg-5.debian.tar.xz
https://github.com/madler/zlib/commit/6a043145ca6e9c55184013841a67b2fef87e44c0

CVE: CVE-2016-9840

Change-Id: I76d280f448f1bb5ab3e7de3a3e93793d6880698a
Signed-off-by: George McCollister <george.mccollister@gmail.com>
1 file changed