fixed zstdmt corruption issue when enabling overlapped sections

see Asana board for detailed explanation on why and how to fix it
This commit is contained in:
Yann Collet
2017-01-25 16:25:38 -08:00
parent 943cff9c37
commit bb0027405a
6 changed files with 46 additions and 18 deletions
+1 -1
View File
@@ -530,7 +530,7 @@ static dRess_t FIO_createDResources(const char* dictFileName)
/* Allocation */
ress.dctx = ZSTD_createDStream();
if (ress.dctx==NULL) EXM_THROW(60, "Can't create ZSTD_DStream");
ZSTD_setDStreamParameter(ress.dctx, ZSTDdsp_maxWindowSize, g_memLimit);
ZSTD_setDStreamParameter(ress.dctx, DStream_p_maxWindowSize, g_memLimit);
ress.srcBufferSize = ZSTD_DStreamInSize();
ress.srcBuffer = malloc(ress.srcBufferSize);
ress.dstBufferSize = ZSTD_DStreamOutSize();