u-boot-2016/lib/bzip2
Albert Astals Cid 8d1b696b55 lib: bzip2: Make sure nSelectors is not out of range
nSelectors is used in a loop from 0 to nSelectors to access selectorMtf
which is
	UChar    selectorMtf[BZ_MAX_SELECTORS];
so if nSelectors is bigger than BZ_MAX_SELECTORS it'll do an invalid memory
access

Fixes out of bounds access discovered while fuzzying karchive

This was reported as CVE-2019-12900
BZ2_decompress in decompress.c in bzip2 through 1.0.6 has an
out-of-bounds write when there are many selectors.

Change-Id: I536d2fe19d7182d4e51f76a502e8f0e72a2359ea
Signed-off-by: Md Sadre Alam <quic_mdalam@quicinc.com>
2022-11-08 15:24:53 +05:30
..
bzlib.c bzlib: Update destLen even on error 2015-01-14 11:35:44 -05:00
bzlib_crctable.c lib: bzip2: move bzip2 files to lib/bzip2/ directory 2014-12-08 09:35:47 -05:00
bzlib_decompress.c lib: bzip2: Make sure nSelectors is not out of range 2022-11-08 15:24:53 +05:30
bzlib_huffman.c lib: bzip2: move bzip2 files to lib/bzip2/ directory 2014-12-08 09:35:47 -05:00
bzlib_private.h lib: bzip2: move bzip2 files to lib/bzip2/ directory 2014-12-08 09:35:47 -05:00
bzlib_randtable.c lib: bzip2: move bzip2 files to lib/bzip2/ directory 2014-12-08 09:35:47 -05:00
Makefile Various Makefiles: Add SPDX-License-Identifier tags 2015-11-10 09:19:52 -05:00