From: Yann Collet Date: Thu, 26 Nov 2015 13:12:23 +0000 (+0100) Subject: fixed bug in legacy decoder v0.2, reported by Maciej Adamczyk X-Git-Tag: zstd-0.4.0^2~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c2ce890ac2b13c1103eaf6bee9aca631a78cbc07;p=thirdparty%2Fzstd.git fixed bug in legacy decoder v0.2, reported by Maciej Adamczyk --- diff --git a/lib/legacy/zstd_v02.c b/lib/legacy/zstd_v02.c index 5c0e7aff3..67d726f64 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;