diff options
author | Yann Collet <yann.collet.73@gmail.com> | 2014-06-02 06:07:19 (GMT) |
---|---|---|
committer | Yann Collet <yann.collet.73@gmail.com> | 2014-06-02 06:07:19 (GMT) |
commit | b636779b0e168c346b42e85af816ce37a8ed9880 (patch) | |
tree | 03c4d8882c25162102c6df6e46b238a5864ed77b /programs/fuzzer.c | |
parent | 302e7e2f2bddc4a9d1ff108c0d9a5079a11b6ed0 (diff) | |
download | lz4-b636779b0e168c346b42e85af816ce37a8ed9880.zip lz4-b636779b0e168c346b42e85af816ce37a8ed9880.tar.gz lz4-b636779b0e168c346b42e85af816ce37a8ed9880.tar.bz2 |
unified structure model
Diffstat (limited to 'programs/fuzzer.c')
-rw-r--r-- | programs/fuzzer.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/programs/fuzzer.c b/programs/fuzzer.c index 4b19703..56208d3 100644 --- a/programs/fuzzer.c +++ b/programs/fuzzer.c @@ -410,7 +410,14 @@ int FUZ_test(U32 seed, int nbCycles, int startCycle, double compressibility) { ret = LZ4_decompress_fast_withPrefix64k(compressedBuffer, decodedBuffer+dictSize, blockSize); FUZ_CHECKTEST(ret!=blockContinueCompressedSize, "LZ4_decompress_fast_withPrefix64k did not read all compressed block input"); crcCheck = XXH32(decodedBuffer+dictSize, blockSize, 0); - FUZ_CHECKTEST(crcCheck!=crcOrig, "LZ4_decompress_fast_withPrefix64k corrupted decoded data"); + if (crcCheck!=crcOrig) + { + int i=0; + while (block[i]==decodedBuffer[i]) i++; + printf("Wrong Byte at position %i/%i\n", i, blockSize); + + } + FUZ_CHECKTEST(crcCheck!=crcOrig, "LZ4_decompress_fast_withPrefix64k corrupted decoded data (dict %i)", dictSize); FUZ_DISPLAYTEST; ret = LZ4_decompress_safe_withPrefix64k(compressedBuffer, decodedBuffer+dictSize, blockContinueCompressedSize, blockSize); @@ -453,7 +460,7 @@ int FUZ_test(U32 seed, int nbCycles, int startCycle, double compressibility) { printf("Wrong Byte at position %i/%i\n", i, blockSize); } - FUZ_CHECKTEST(crcCheck!=crcOrig, "LZ4_decompress_fast_usingDict corrupted decoded data"); + FUZ_CHECKTEST(crcCheck!=crcOrig, "LZ4_decompress_fast_usingDict corrupted decoded data (dict %i)", dictSize); FUZ_DISPLAYTEST; decodedBuffer[blockSize] = 0; |