summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYann Collet <Cyan4973@users.noreply.github.com>2019-05-31 00:28:59 (GMT)
committerGitHub <noreply@github.com>2019-05-31 00:28:59 (GMT)
commitb77c9c062dcffedd25ccc18a8b59330a270c8677 (patch)
tree7a90c235d6d289896d7f58cdb44a2d5b0f38230d
parentab2248b90a86c5af0b64f920810d519bd237c5c4 (diff)
parent2be2fe43a8460521c90edcfbbb98517933429f4d (diff)
downloadlz4-b77c9c062dcffedd25ccc18a8b59330a270c8677.zip
lz4-b77c9c062dcffedd25ccc18a8b59330a270c8677.tar.gz
lz4-b77c9c062dcffedd25ccc18a8b59330a270c8677.tar.bz2
Merge pull request #714 from dreambottle/fix-lz4f-input-buf-use
Fix src temporary buffer use in lz4frame
-rw-r--r--lib/lz4frame.c2
1 files changed, 1 insertions, 1 deletions
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;
}