From c2ce890ac2b13c1103eaf6bee9aca631a78cbc07 Mon Sep 17 00:00:00 2001 From: Yann Collet Date: Thu, 26 Nov 2015 14:12:23 +0100 Subject: [PATCH] fixed bug in legacy decoder v0.2, reported by Maciej Adamczyk --- lib/legacy/zstd_v02.c | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/legacy/zstd_v02.c b/lib/legacy/zstd_v02.c index 5c0e7aff..67d726f6 100644 --- a/lib/legacy/zstd_v02.c +++ b/lib/legacy/zstd_v02.c @@ -3155,6 +3155,7 @@ static size_t ZSTD_decodeLiteralsBlock(void* ctx, { if (litSize > srcSize-3) return ERROR(corruption_detected); memcpy(dctx->litBuffer, istart, litSize); + dctx->litPtr = dctx->litBuffer; dctx->litBufSize = BLOCKSIZE; dctx->litSize = litSize; return litSize+3;