]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
new api fuzzer set : dictionary is randomly set
authorYann Collet <yann.collet.73@gmail.com>
Mon, 19 Jun 2017 06:31:55 +0000 (23:31 -0700)
committerYann Collet <yann.collet.73@gmail.com>
Mon, 19 Jun 2017 06:31:55 +0000 (23:31 -0700)
tests/zstreamtest.c

index e087dd722a894a00cb579e1ddeea3112d6e642d1..0785aecb4e0e67cd9e2f1c4f88b990b750a5c199 100644 (file)
@@ -1292,6 +1292,7 @@ static int fuzzerTests_newAPI(U32 seed, U32 nbTests, unsigned startTest, double
                 if (FUZ_rand(&lseed) & 1) CHECK_Z( ZSTD_CCtx_setParameter(zc, ZSTD_p_minMatch, cParams.searchLength) );
                 if (FUZ_rand(&lseed) & 1) CHECK_Z( ZSTD_CCtx_setParameter(zc, ZSTD_p_targetLength, cParams.targetLength) );
 
+                if (FUZ_rand(&lseed) & 1) { dict=NULL; dictSize=0; }
                 CHECK_Z( ZSTD_CCtx_loadDictionary(zc, dict, dictSize) );
 
                 /* to do : check that cParams are blocked after loading non-NULL dictionary */