lzxpress: add bounds checking to lzxpress_decompress()
commita97c78fb221a2f1aaca2effdb44c51e4f78ddd93
authorStefan Metzmacher <metze@samba.org>
Thu, 7 Nov 2019 09:03:36 +0000 (7 10:03 +0100)
committerDouglas Bagnall <dbagnall@samba.org>
Sun, 9 Aug 2020 00:30:26 +0000 (9 00:30 +0000)
tree569aaafd103c0fb64d63cffcd2ec62b526c97ea3
parentf50987df038846f0052d4c33bb534af9f2c79061
lzxpress: add bounds checking to lzxpress_decompress()

lzxpress_decompress() would wander past the end of the array in
numerous locations.

Credit to OSS-Fuzz.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=14190
REF: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=19382
REF: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=20083
REF: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=22485
REF: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=22667

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Autobuild-User(master): Douglas Bagnall <dbagnall@samba.org>
Autobuild-Date(master): Sun Aug  9 00:30:26 UTC 2020 on sn-devel-184
lib/compression/lzxpress.c