From ea2af1ffc429981214124572524790c82126493a Mon Sep 17 00:00:00 2001 From: Paul Cruz Date: Mon, 19 Jun 2017 17:34:50 -0700 Subject: [PATCH] changed dictionary to stay reasonable size during test --- tests/decodecorpus.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/decodecorpus.c b/tests/decodecorpus.c index 8e2cefb4..4b42c6d7 100644 --- a/tests/decodecorpus.c +++ b/tests/decodecorpus.c @@ -1387,7 +1387,8 @@ static int runTestMode(U32 seed, unsigned numFiles, unsigned const testDurationS } } { - size_t const dictSize = RAND(&seed); + /* don't create a dictionary that is too big */ + size_t const dictSize = RAND(&seed) % (10 << 20); size_t const r = testDecodeWithDict(seed, dictSize); if (ZSTD_isError(r)) { DISPLAY("Error in dictionary mode on test seed %u: %s\n", seed+fnum, ZSTD_getErrorName(r));