Fix Segfault When Copying Dict

dctx must have been initialized before we can copy the dictionary in.
This commit is contained in:
W. Felix Handte 2017-09-22 11:52:29 -07:00
parent 810e2ca27b
commit 77f7245ea7

View File

@ -1616,6 +1616,7 @@ size_t LZ4F_decompress(LZ4F_dctx* dctx,
if ( (dctx->frameInfo.blockMode==LZ4F_blockLinked) if ( (dctx->frameInfo.blockMode==LZ4F_blockLinked)
&& (dctx->dict != dctx->tmpOutBuffer) && (dctx->dict != dctx->tmpOutBuffer)
&& (dctx->dStage != dstage_getFrameHeader) && (dctx->dStage != dstage_getFrameHeader)
&& (dctx->dStage != dstage_storeFrameHeader)
&& (!decompressOptionsPtr->stableDst) && (!decompressOptionsPtr->stableDst)
&& ((unsigned)(dctx->dStage-1) < (unsigned)(dstage_getSuffix-1)) ) && ((unsigned)(dctx->dStage-1) < (unsigned)(dstage_getSuffix-1)) )
{ {