1
0
mirror of https://github.com/facebook/zstd.git synced 2025-03-06 16:56:49 +02:00

ensure cdict is properly reset to NULL

This commit is contained in:
Yann Collet 2025-02-01 00:55:52 -08:00
parent 7406d2b6eb
commit f11bd19c7f
2 changed files with 3 additions and 2 deletions

View File

@ -67,11 +67,11 @@ jobs:
- name: thread sanitizer zstreamtest
run: CC=clang ZSTREAM_TESTTIME=-T3mn make tsan-test-zstream
ubsan-zstreamtest:
uasan-zstreamtest:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # tag=v4.1.1
- name: undefined behavior sanitizer zstreamtest
- name: ub + address sanitizer on zstreamtest
run: CC=clang make uasan-test-zstream
# lasts ~15mn

View File

@ -1323,6 +1323,7 @@ size_t ZSTDMT_initCStream_internal(
/* update dictionary */
ZSTD_freeCDict(mtctx->cdictLocal);
mtctx->cdictLocal = NULL;
mtctx->cdict = NULL;
if (dict) {
if (dictContentType == ZSTD_dct_rawContent) {
mtctx->inBuff.prefix.start = (const BYTE*)dict;