From: conor42 Date: Thu, 11 Jan 2018 01:42:58 +0000 (+1000) Subject: Fix break condition in decompression noise test X-Git-Tag: v1.3.4~1^2~90^2 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0e88f6e97b62bbb66f5ac917c7d560dfb7ca4dab;p=thirdparty%2Fzstd.git Fix break condition in decompression noise test The bug prevents noise being added --- diff --git a/tests/fuzzer.c b/tests/fuzzer.c index 141bf6548..0f82ee61e 100644 --- a/tests/fuzzer.c +++ b/tests/fuzzer.c @@ -1412,7 +1412,7 @@ static int fuzzerTests(U32 seed, U32 nbTests, unsigned startTest, U32 const maxD size_t const skipLength = FUZ_rand(&lseed) & mask; pos += skipLength; } - if (pos <= cSize) break; + if (pos >= cSize) break; /* add noise */ { U32 const nbBitsCodes = FUZ_rand(&lseed) % maxNbBits; U32 const nbBits = nbBitsCodes ? nbBitsCodes-1 : 0;