From: Yann Collet Date: Mon, 30 Jan 2017 20:46:35 +0000 (-0800) Subject: zstreamtest uses random overlapLog for fuzzing X-Git-Tag: v1.1.3^2~6^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=cd23dd24af69b3f9b500502c1e10c3047e75ac4b;p=thirdparty%2Fzstd.git zstreamtest uses random overlapLog for fuzzing --- diff --git a/tests/zstreamtest.c b/tests/zstreamtest.c index bef8734c7..c053172e9 100644 --- a/tests/zstreamtest.c +++ b/tests/zstreamtest.c @@ -834,9 +834,10 @@ static int fuzzerTests_MT(U32 seed, U32 nbTests, unsigned startTest, double comp DISPLAYLEVEL(5, "Init with windowLog = %u \n", params.cParams.windowLog); params.fParams.checksumFlag = FUZ_rand(&lseed) & 1; params.fParams.noDictIDFlag = FUZ_rand(&lseed) & 1; - { size_t const initError = ZSTDMT_initCStream_advanced(zc, dict, dictSize, params, pledgedSrcSize); - CHECK (ZSTD_isError(initError),"ZSTDMT_initCStream_advanced error : %s", ZSTD_getErrorName(initError)); - } } } + { size_t const initError = ZSTDMT_initCStream_advanced(zc, dict, dictSize, params, pledgedSrcSize); + CHECK (ZSTD_isError(initError),"ZSTDMT_initCStream_advanced error : %s", ZSTD_getErrorName(initError)); } + ZSTDMT_setMTCtxParameter(zc, ZSTDMT_p_overlapSectionLog, FUZ_rand(&lseed) % 12); + } } /* multi-segments compression test */ XXH64_reset(&xxhState, 0);