From 92c98a5b216e97fdb257e13e5cbdd06256d9f5d0 Mon Sep 17 00:00:00 2001 From: Yann Collet Date: Mon, 30 Jan 2017 12:50:31 -0800 Subject: [PATCH] zstreamtest uses random section sizes for fuzzing --- tests/zstreamtest.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/zstreamtest.c b/tests/zstreamtest.c index c053172e..aeaf02b3 100644 --- a/tests/zstreamtest.c +++ b/tests/zstreamtest.c @@ -837,6 +837,7 @@ static int fuzzerTests_MT(U32 seed, U32 nbTests, unsigned startTest, double comp { 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); + ZSTDMT_setMTCtxParameter(zc, ZSTDMT_p_sectionSize, FUZ_rand(&lseed) % (2*maxTestSize+1)); } } /* multi-segments compression test */