fixed : premature frame end on zero-sized raw block - reported by @ebiggers

This commit is contained in:
Yann Collet 2016-07-17 15:39:24 +02:00
parent 10f999f856
commit 972e5806ee

View File

@ -1013,7 +1013,7 @@ static size_t ZSTD_decompressFrame(ZSTD_DCtx* dctx,
default:
return ERROR(GENERIC); /* impossible */
}
if (cBlockSize == 0) break; /* bt_end */
if (blockProperties.blockType == bt_end) break; /* bt_end */
if (ZSTD_isError(decodedSize)) return decodedSize;
if (dctx->fParams.checksumFlag) XXH64_update(&dctx->xxhState, op, decodedSize);