]> git.ipfire.org Git - thirdparty/zstd.git/commit
Fixed a nasty corruption bug
authorYann Collet <cyan@fb.com>
Fri, 1 Jun 2018 22:18:32 +0000 (15:18 -0700)
committerYann Collet <cyan@fb.com>
Sat, 2 Jun 2018 01:54:34 +0000 (18:54 -0700)
commit2108decb41c953a2edcc3a8cb7becceb3981bd7a
tree77a83a5e35ee483c958ea4883b788cc55f240a77
parent143fc9ff6cfe6838d1d739b2d407a1cfaada49af
Fixed a nasty corruption bug

recently introduce into the new dictionary mode.
The bug could be reproduced with this command :
./zstreamtest -v --opaqueapi --no-big-tests -s4092 -t639

error was in function ZSTD_count_2segments() :
the beginning of the 2nd segment corresponds to prefixStart
and not the beginning of the current block (istart == src).
This would result in comparing the wrong byte.
lib/compress/zstd_compress.c
lib/compress/zstd_compress_internal.h
lib/compress/zstd_double_fast.c
lib/compress/zstd_fast.c
lib/decompress/zstd_decompress.c
tests/zstreamtest.c