Backport fix from commit 9e8b09a

Fixes uninitialized memory reads.
Full commit hash: 9e8b09a7bd
dev
Nick Terrell 2016-10-18 14:22:49 -07:00
parent fd98087047
commit f45b157d95
1 changed files with 1 additions and 0 deletions

View File

@ -2967,6 +2967,7 @@ size_t ZSTDv05_decodeLiteralsBlock(ZSTDv05_DCtx* dctx,
break;
}
if (litSize > BLOCKSIZE) return ERROR(corruption_detected);
if (litCSize + lhSize > srcSize) return ERROR(corruption_detected);
if (HUFv05_isError(singleStream ?
HUFv05_decompress1X2(dctx->litBuffer, litSize, istart+lhSize, litCSize) :