fix out-of-bound read within LZ4_decompress_fast()
authorYann Collet <cyan@fb.com>
Wed, 17 Apr 2019 22:01:53 +0000 (15:01 -0700)
committerYann Collet <cyan@fb.com>
Wed, 17 Apr 2019 22:01:53 +0000 (15:01 -0700)
commit25d96f1e4d84b9fca8f754cd91b822fc32758e5c
tree7c2818389ade8b2eed6b1900e659427c6dbdafc6
parent1ed69691a1d1226a6d6e7c465eb1e8c2706833cb
fix out-of-bound read within LZ4_decompress_fast()

and deprecate LZ4_decompress_fast(),
with deprecation warnings enabled by default.

Note that, as a consequence of the fix,
LZ4_decompress_fast is now __slower__ than LZ4_decompress_safe().
That's because, since it doesn't know the input buffer size,
it must progress more cautiously into the input buffer
to ensure to out-of-bound read.
lib/lz4.c
lib/lz4.h