diff options
author | Yann Collet <cyan@fb.com> | 2019-08-15 11:59:59 (GMT) |
---|---|---|
committer | Yann Collet <cyan@fb.com> | 2019-08-15 11:59:59 (GMT) |
commit | fdf2ef5809ca875c454510610764d9125ef2ebbd (patch) | |
tree | 8c4c3cacf90599887a5b02a46ec6f052f4422ef0 /tests | |
parent | dfad84ca3eca2fb89a1cdb5adf829975035827d5 (diff) | |
download | lz4-fdf2ef5809ca875c454510610764d9125ef2ebbd.zip lz4-fdf2ef5809ca875c454510610764d9125ef2ebbd.tar.gz lz4-fdf2ef5809ca875c454510610764d9125ef2ebbd.tar.bz2 |
fixed test errorv1.9.2
could trigger %0 on exceptional circumstances
due to wrong buffer size parameter.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/frametest.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/frametest.c b/tests/frametest.c index 91813bb..1b932e4 100644 --- a/tests/frametest.c +++ b/tests/frametest.c @@ -1059,7 +1059,7 @@ int fuzzerTests(U32 seed, unsigned nbTests, unsigned startTest, double compressi size_t const mask = (1<<nbBits) - 1; size_t const rNoiseLength = (FUZ_rand(&randState) & mask) + 1; size_t const noiseLength = MIN(rNoiseLength, cSize-pos); - size_t const noiseStart = FUZ_rand(&randState) % (COMPRESSIBLE_NOISE_LENGTH - noiseLength); + size_t const noiseStart = FUZ_rand(&randState) % (CNBufferLength - noiseLength); memcpy((BYTE*)compressedBuffer + pos, (const char*)CNBuffer + noiseStart, noiseLength); pos += noiseLength; } } } |