Skip to content

Commit

Permalink
Merge pull request #3157 from embg/huge_dict_bugfix
Browse files Browse the repository at this point in the history
Bugfix for huge dictionaries
  • Loading branch information
embg authored Jun 9, 2022
2 parents 27bf96e + 31bd640 commit f313a77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/compress/zstd_compress.c
Original file line number Diff line number Diff line change
Expand Up @@ -4219,7 +4219,7 @@ static size_t ZSTD_loadDictionaryContent(ZSTD_matchState_t* ms,
* Dictionaries right at the edge will immediately trigger overflow
* correction, but I don't want to insert extra constraints here.
*/
U32 const maxDictSize = ZSTD_CURRENT_MAX - 1;
U32 const maxDictSize = ZSTD_CURRENT_MAX - ZSTD_WINDOW_START_INDEX;
/* We must have cleared our windows when our source is this large. */
assert(ZSTD_window_isEmpty(ms->window));
if (loadLdmDict)
Expand Down

0 comments on commit f313a77

Please sign in to comment.