fixed : frame concatenation without checksum

This commit is contained in:
Yann Collet
2016-07-28 20:30:25 +02:00
parent 60ba31c570
commit 4c5bbf64f9
4 changed files with 34 additions and 1 deletions
+1 -1
View File
@@ -282,7 +282,7 @@ size_t ZBUFF_decompressContinue(ZBUFF_DCtx* zbd,
*dstCapacityPtr = op-ostart;
{ size_t nextSrcSizeHint = ZSTD_nextSrcSizeToDecompress(zbd->zd);
if (!nextSrcSizeHint) return (zbd->outEnd != zbd->outStart); /* return 0 only if fully flushed too */
if (nextSrcSizeHint > 4) nextSrcSizeHint += ZSTD_blockHeaderSize;
nextSrcSizeHint += ZSTD_blockHeaderSize * (ZSTD_nextInputType(zbd->zd) == ZSTDnit_block);
if (zbd->inPos > nextSrcSizeHint) return ERROR(GENERIC); /* should never happen */
nextSrcSizeHint -= zbd->inPos; /* already loaded*/
return nextSrcSizeHint;