mirror of
https://github.com/facebook/zstd.git
synced 2024-12-13 05:16:43 +08:00
ZSTD_decompressFrame(): pass up error code from ZSTD_decodeFrameHeader()
This commit is contained in:
parent
e4d0265ea9
commit
aa6c70bf60
@ -860,9 +860,11 @@ static size_t ZSTD_decompressFrame(ZSTD_DCtx* dctx,
|
||||
|
||||
/* Frame Header */
|
||||
{ size_t const frameHeaderSize = ZSTD_frameHeaderSize(src, ZSTD_frameHeaderSize_min);
|
||||
size_t result;
|
||||
if (ZSTD_isError(frameHeaderSize)) return frameHeaderSize;
|
||||
if (srcSize < frameHeaderSize+ZSTD_blockHeaderSize) return ERROR(srcSize_wrong);
|
||||
if (ZSTD_decodeFrameHeader(dctx, src, frameHeaderSize)) return ERROR(corruption_detected);
|
||||
result = ZSTD_decodeFrameHeader(dctx, src, frameHeaderSize);
|
||||
if (ZSTD_isError(result)) return result;
|
||||
ip += frameHeaderSize; remainingSize -= frameHeaderSize;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user