From: W. Felix Handte Date: Thu, 23 Aug 2018 18:57:54 +0000 (-0700) Subject: Also Assert Equivalency When Filling MatchState with Prefix X-Git-Tag: v1.3.6^2~10^2~27 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3483f89101671d797a8776f4881555cbab80f932;p=thirdparty%2Fzstd.git Also Assert Equivalency When Filling MatchState with Prefix --- diff --git a/lib/compress/zstd_compress.c b/lib/compress/zstd_compress.c index b9785195f..ecde50254 100644 --- a/lib/compress/zstd_compress.c +++ b/lib/compress/zstd_compress.c @@ -2700,6 +2700,9 @@ static size_t ZSTD_loadDictionaryContent(ZSTD_matchState_t* ms, ZSTD_window_update(&ms->window, src, srcSize); ms->loadedDictEnd = params->forceWindow ? 0 : (U32)(iend - ms->window.base); + /* Assert that we the ms params match the params we're being given */ + assert(ZSTD_equivalentCParams(params->cParams, ms->cParams)); + if (srcSize <= HASH_READ_SIZE) return 0; switch(params->cParams.strategy)