lib: decompress_unzstd: Limit output size
authorPaul Cercueil <paul@crapouillou.net>
Tue, 1 Sep 2020 14:26:50 +0000 (16:26 +0200)
committerThomas Bogendoerfer <tsbogend@alpha.franken.de>
Thu, 3 Sep 2020 08:13:09 +0000 (10:13 +0200)
commit1c4dd334df3a0627ff57b35612057e2b497e373b
tree0ad03f863d2c803b825494d8d111fc87f2a91512
parentaa9c45db018fadd8d15611ba403d4a8e7c6521a9
lib: decompress_unzstd: Limit output size

The zstd decompression code, as it is right now, will most likely fail
on 32-bit systems, as the default output buffer size causes the buffer's
end address to overflow.

Address this issue by setting a sane default to the default output size,
with a value that won't overflow the buffer's end address.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Reviewed-by: Nick Terrell <terrelln@fb.com>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
lib/decompress_unzstd.c