u-boot-2016/lib/zlib
Chin Liang See cbe64dd980 lib/zlib: Remove offset pointer optimization
This fixes the CVE-2016-9840. Commit imported from [1].

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.

[1]: 6a043145ca

Change-Id: I816eea011f2d22b5a3f1fda8aa672b19ed284932
Signed-off-by: Mark Adler <madler@alumni.caltech.edu>
Signed-off-by: Chin Liang See <chin.liang.see@intel.com>
Signed-off-by: Ley Foon Tan <ley.foon.tan@intel.com>
Signed-off-by: Md Sadre Alam <quic_mdalam@quicinc.com>
2022-11-24 12:47:26 +05:30
..
adler32.c lib/zlib: sparse fixes 2012-11-04 11:00:36 -07:00
deflate.c ipq807x: Add support for compressed crashdump collection. 2019-12-23 09:26:21 +05:30
deflate.h lib: zlib: import deflate source file from 1.2.5 2012-09-29 07:26:08 -07:00
inffast.c lib/zlib: sparse fixes 2012-11-04 11:00:36 -07:00
inffast.h zlib: split up to match original source tree 2011-04-30 20:21:45 +02:00
inffixed.h zlib: split up to match original source tree 2011-04-30 20:21:45 +02:00
inflate.c lib/zlib: sparse fixes 2012-11-04 11:00:36 -07:00
inflate.h zlib: split up to match original source tree 2011-04-30 20:21:45 +02:00
inftrees.c lib/zlib: Remove offset pointer optimization 2022-11-24 12:47:26 +05:30
inftrees.h zlib: split up to match original source tree 2011-04-30 20:21:45 +02:00
Makefile lib: descend into sub directories only when it is necessary 2013-11-17 14:11:30 -05:00
trees.c lib: zlib: include deflate into zlib build 2012-09-29 07:26:08 -07:00
trees.h lib: zlib: import trees file from 1.2.5 2012-09-29 07:26:08 -07:00
zlib.c lib: zlib: include deflate into zlib build 2012-09-29 07:26:08 -07:00
zlib.h Replace <compiler.h> with <linux/compiler.h> 2014-12-08 09:35:46 -05:00
zutil.c Move malloc_cache_aligned() to its own header 2015-09-11 17:15:16 -04:00
zutil.h lib: zlib: include deflate into zlib build 2012-09-29 07:26:08 -07:00