From: Niko Dzhus Date: Fri, 24 May 2019 15:25:06 +0000 (+0300) Subject: fix temporary buffer use when input size hint is respected X-Git-Tag: upstream/1.9.3~2^2~34^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=2be2fe43a8460521c90edcfbbb98517933429f4d;p=platform%2Fupstream%2Flz4.git fix temporary buffer use when input size hint is respected --- diff --git a/lib/lz4frame.c b/lib/lz4frame.c index 95b8b8e..cc7f2d5 100644 --- a/lib/lz4frame.c +++ b/lib/lz4frame.c @@ -1494,7 +1494,7 @@ size_t LZ4F_decompress(LZ4F_dctx* dctx, /* next block is a compressed block */ dctx->tmpInTarget = nextCBlockSize + crcSize; dctx->dStage = dstage_getCBlock; - if (dstPtr==dstEnd) { + if (dstPtr==dstEnd || srcPtr==srcEnd) { nextSrcSizeHint = BHSize + nextCBlockSize + crcSize; doAnotherStage = 0; }