diff options
author | Nick Terrell <terrelln@fb.com> | 2016-11-05 02:59:50 (GMT) |
---|---|---|
committer | Nick Terrell <terrelln@fb.com> | 2016-11-05 03:01:23 (GMT) |
commit | 920bf21714f99cc20d3b8bcc28060136a390354a (patch) | |
tree | 6057917cbd5ac8599b22736ef2db83ad48ec9654 /lib/lz4.c | |
parent | 8195ba8f7bbf0153a1dc01d2ada8823a29462afa (diff) | |
download | lz4-920bf21714f99cc20d3b8bcc28060136a390354a.zip lz4-920bf21714f99cc20d3b8bcc28060136a390354a.tar.gz lz4-920bf21714f99cc20d3b8bcc28060136a390354a.tar.bz2 |
Fix LZ4_decompress_fast_continue() bug
It specified the external dictionary location incorrectly.
Add tests that expose this bug with both normal compilation and ASAN.
Diffstat (limited to 'lib/lz4.c')
-rw-r--r-- | lib/lz4.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1366,7 +1366,7 @@ int LZ4_decompress_fast_continue (LZ4_streamDecode_t* LZ4_streamDecode, const ch lz4sd->prefixEnd += originalSize; } else { lz4sd->extDictSize = lz4sd->prefixSize; - lz4sd->externalDict = (BYTE*)dest - lz4sd->extDictSize; + lz4sd->externalDict = lz4sd->prefixEnd - lz4sd->extDictSize; result = LZ4_decompress_generic(source, dest, 0, originalSize, endOnOutputSize, full, 0, usingExtDict, (BYTE*)dest, lz4sd->externalDict, lz4sd->extDictSize); |