Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lib/dictBuilder/cover.c
Original file line number Diff line number Diff line change
Expand Up @@ -1075,6 +1075,10 @@ COVER_dictSelection_t COVER_selectDict(BYTE* customDictContent, size_t dictBuffe
free(candidateDictBuffer);
return COVER_dictSelectionError(dictContentSize);
}
/* Update customDictContentEnd to reflect the actual size after finalization.
* ZDICT_finalizeDictionary() may shrink dictContentSize by adding the header,
* so the pointer computed before the call would be stale. */
customDictContentEnd = customDictContent + dictContentSize;

totalCompressedSize = COVER_checkTotalCompressedSize(params, samplesSizes,
samplesBuffer, offsets,
Expand Down