uboot/lib
Simon Glass f6eec89fa3 lzma: fix buffer bound check error further
Commit 4d3b8a0d fixed a problem with lzma decompress where it would
run out of bytes to decompress. The algorithm needs to know how many
uncompressed bytes it is expected to produce.

However, the fix introduced a potential buffer overrun, and causes
the compression test to fail (test_compression command in sandbox).

The correct fix seems to be to use the minimum of the expected number
of uncompressed bytes and the amount of output space available. That
way things work normally when there is enough space, and return an
error (without overrunning available space) when there is not.

Signed-off-by: Antonios Vamporakis <ant@area128.com>
CC: Kees Cook <keescook@chromium.org>
CC: Simon Glass <sjg@chromium.org>
CC: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
CC: Luka Perkov <luka@openwrt.org>

Signed-off-by: Simon Glass <sjg@chromium.org>
2015-01-14 11:35:43 -05:00
..
bzip2 lib: bzip2: move bzip2 files to lib/bzip2/ directory 2014-12-08 09:35:47 -05:00
libfdt libfdt: move CONFIG_OF_LIBFDT and CONFIG_FIT to lib/Makefile 2014-12-08 09:35:47 -05:00
lzma lzma: fix buffer bound check error further 2015-01-14 11:35:43 -05:00
lzo
rsa rsa: Fix two errors in the implementation 2014-08-09 11:17:04 -04:00
tizen Logo: TIZEN: Change booting logo size to official size. 2014-03-28 15:06:30 -04:00
zlib Replace <compiler.h> with <linux/compiler.h> 2014-12-08 09:35:46 -05:00
Kconfig kconfig: move CONFIG_USE_PRIVATE_LIBGCC to Kconfig 2014-10-23 13:19:09 -04:00
Makefile lib: errno: introduce errno_str(): returns errno related message 2014-12-11 13:18:41 -07:00
addr_map.c
aes.c aes: make apply_cbc_chain_data non-static 2014-04-18 16:14:17 -04:00
asm-offsets.c x86: Clean up asm-offsets 2014-12-13 22:32:04 -07:00
bch.c
bitrev.c
circbuf.c
crc7.c
crc8.c
crc16.c
crc32.c
ctype.c
display_options.c Tidy up data sizes and function comment in display_options 2014-10-27 11:04:01 -04:00
div64.c lib: div64: add missing include 2014-07-18 17:53:22 -04:00
errno.c
errno_str.c lib: errno: introduce errno_str(): returns errno related message 2014-12-11 13:18:41 -07:00
fdtdec.c fdt: Add several apis to decode pci device node 2015-01-13 07:24:40 -08:00
fdtdec_common.c lib, fdt: move fdtdec_get_int() out of lib/fdtdec.c 2014-06-23 09:11:30 -04:00
fdtdec_test.c
gunzip.c
gzip.c
hang.c
hashtable.c Add option -r to env import to allow import of text files with CRLF as line endings 2014-07-22 07:44:26 -04:00
initcall.c initcall: add explicit hint if initcall was relocated 2014-12-29 16:31:23 -05:00
ldiv.c
linux_compat.c lib, linux: move linux specific defines to linux/compat.h 2014-08-25 19:25:03 -04:00
linux_string.c
list_sort.c kbuild: force to define __UBOOT__ in all the C sources 2014-09-16 12:23:56 -04:00
lmb.c lmb: make local functions static 2014-10-25 07:02:01 -04:00
md5.c
net_utils.c
physmem.c
qsort.c
rand.c
rbtree.c kbuild: force to define __UBOOT__ in all the C sources 2014-09-16 12:23:56 -04:00
sha1.c lib:sha1: remove unused constant 2014-07-18 17:53:23 -04:00
sha256.c includes: move openssl headers to include/u-boot 2014-06-19 11:19:04 -04:00
slre.c
string.c lib: string: move strlcpy() to a common place 2014-12-11 13:18:41 -07:00
strmhz.c replace DIV_ROUND with DIV_ROUND_CLOSEST 2014-11-20 11:28:25 -05:00
time.c Use uint64_t for time types 2014-10-27 11:04:01 -04:00
tpm.c includes: move openssl headers to include/u-boot 2014-06-19 11:19:04 -04:00
trace.c
uuid.c cmd:gpt: randomly generate each partition uuid if undefined 2014-04-02 16:36:06 -04:00
vsprintf.c vsprintf: Add modifier for phys_addr_t 2014-11-23 06:49:01 -05:00