From: Yann Collet Date: Sun, 10 Apr 2016 12:42:26 +0000 (+0200) Subject: Fix infinite loop with invalid data (fuzzer test) X-Git-Tag: v0.6.0^2~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ccbba296e1387082c3f01d8956205bc12eb7d6d0;p=thirdparty%2Fzstd.git Fix infinite loop with invalid data (fuzzer test) --- diff --git a/lib/zstd_decompress.c b/lib/zstd_decompress.c index 7de1f29d6..94caa0904 100644 --- a/lib/zstd_decompress.c +++ b/lib/zstd_decompress.c @@ -769,7 +769,7 @@ static size_t ZSTD_decompressSequences( { size_t const seqHSize = ZSTD_decodeSeqHeaders(&nbSeq, DTableLL, DTableML, DTableOffb, dctx->flagRepeatTable, ip, seqSize); if (ZSTD_isError(seqHSize)) return seqHSize; ip += seqHSize; - dctx->flagRepeatTable = 1; + dctx->flagRepeatTable = 0; } /* Regen sequences */ diff --git a/programs/.gitignore b/programs/.gitignore index fe074a767..886af777c 100644 --- a/programs/.gitignore +++ b/programs/.gitignore @@ -38,6 +38,9 @@ dictionary grillResults.txt _* +# fuzzer +afl + # Misc files *.bat fileTests.sh