diff options
author | Yann Collet <cyan@fb.com> | 2019-06-29 03:55:47 (GMT) |
---|---|---|
committer | Yann Collet <cyan@fb.com> | 2019-06-29 03:55:47 (GMT) |
commit | 3b917ef6e6e9b18b15f18b6d691c4ea5033cfe41 (patch) | |
tree | bc30112c08395acebe06a422b37a2c87955e2900 /tests/fuzzer.c | |
parent | 567b4e098baad783870bf6514a984c4b021d5056 (diff) | |
download | lz4-3b917ef6e6e9b18b15f18b6d691c4ea5033cfe41.zip lz4-3b917ef6e6e9b18b15f18b6d691c4ea5033cfe41.tar.gz lz4-3b917ef6e6e9b18b15f18b6d691c4ea5033cfe41.tar.bz2 |
travisCI: added ASAN fuzzer tests
and fixed minor formatting warnings
Diffstat (limited to 'tests/fuzzer.c')
-rw-r--r-- | tests/fuzzer.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/fuzzer.c b/tests/fuzzer.c index 368b28b..7b6e929 100644 --- a/tests/fuzzer.c +++ b/tests/fuzzer.c @@ -126,7 +126,7 @@ static U32 FUZ_highbit32(U32 v32) { unsigned nbBits = 0; if (v32==0) return 0; - while (v32) v32 >>= 1, nbBits++; + while (v32) { v32 >>= 1; nbBits++; } return nbBits; } @@ -766,8 +766,8 @@ static int FUZ_test(U32 seed, U32 nbCycles, const U32 startCycle, const double c if (blockSize > missingBytes) { decodedBuffer[blockSize-missingBytes] = 0; ret = LZ4_decompress_safe_usingDict(compressedBuffer, decodedBuffer, blockContinueCompressedSize, blockSize-missingBytes, dict, dictSize); - FUZ_CHECKTEST(ret>=0, "LZ4_decompress_safe_usingDict should have failed : output buffer too small (-%u byte)", missingBytes); - FUZ_CHECKTEST(decodedBuffer[blockSize-missingBytes], "LZ4_decompress_safe_usingDict overrun specified output buffer size (-%u byte) (blockSize=%i)", missingBytes, blockSize); + FUZ_CHECKTEST(ret>=0, "LZ4_decompress_safe_usingDict should have failed : output buffer too small (-%i byte)", missingBytes); + FUZ_CHECKTEST(decodedBuffer[blockSize-missingBytes], "LZ4_decompress_safe_usingDict overrun specified output buffer size (-%i byte) (blockSize=%i)", missingBytes, blockSize); } } /* Compress using external dictionary stream */ |