diff options
author | Yann Collet <yann.collet.73@gmail.com> | 2019-04-18 23:06:02 (GMT) |
---|---|---|
committer | Yann Collet <yann.collet.73@gmail.com> | 2019-04-18 23:07:16 (GMT) |
commit | 0b876db6d42ec22da0c635e97a0d690908f2104a (patch) | |
tree | 2ee943a56f12698153a5e0c305a65a2f7016ad7a /tests/fuzzer.c | |
parent | 5a6d72447ae998b387794df1135023689aa89995 (diff) | |
download | lz4-0b876db6d42ec22da0c635e97a0d690908f2104a.zip lz4-0b876db6d42ec22da0c635e97a0d690908f2104a.tar.gz lz4-0b876db6d42ec22da0c635e97a0d690908f2104a.tar.bz2 |
address a few minor Visual warnings
and created target cxx17build
Diffstat (limited to 'tests/fuzzer.c')
-rw-r--r-- | tests/fuzzer.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/fuzzer.c b/tests/fuzzer.c index 78f90a1..9908a7b 100644 --- a/tests/fuzzer.c +++ b/tests/fuzzer.c @@ -490,6 +490,7 @@ static int FUZ_test(U32 seed, U32 nbCycles, const U32 startCycle, const double c /* Test decompress_fast() with input buffer size exactly correct => must not read out of bound */ { char* const cBuffer_exact = (char*)malloc((size_t)compressedSize); assert(cBuffer_exact != NULL); + assert(compressedSize <= compressedBufferSize); memcpy(cBuffer_exact, compressedBuffer, compressedSize); /* Test decoding with output size exactly correct => must work */ @@ -1302,9 +1303,8 @@ static void FUZ_unitTests(int compressionLevel) int iNext = 0; int dNext = 0; int compressedSize; - size_t const testVerifySize = testInputSize; - assert((size_t)dBufferSize * 2 + 1 < testVerifySize); /* space used by ringBufferSafe and ringBufferFast */ + assert((size_t)dBufferSize * 2 + 1 < testInputSize); /* space used by ringBufferSafe and ringBufferFast */ XXH64_reset(&xxhOrig, 0); XXH64_reset(&xxhNewSafe, 0); XXH64_reset(&xxhNewFast, 0); |