Merge pull request #1547 from shakeelrao/fix-error

Fix incorrect error code in ZSTD_errorFrameSizeInfo
This commit is contained in:
Nick Terrell
2019-03-15 10:57:49 -07:00
committed by GitHub
3 changed files with 26 additions and 6 deletions
+2 -2
View File
@@ -437,7 +437,7 @@ static size_t ZSTD_decodeFrameHeader(ZSTD_DCtx* dctx, const void* src, size_t he
* Contains the compressed frame size and an upper-bound for the decompressed frame size.
* Note: before using `compressedSize` you must check for errors using ZSTD_isError().
* similarly, before using `decompressedBound`, you must check for errors using:
* `decompressedBound` != ZSTD_CONTENTSIZE_UNKNOWN
* `decompressedBound` != ZSTD_CONTENTSIZE_ERROR
*/
typedef struct {
size_t compressedSize;
@@ -448,7 +448,7 @@ static ZSTD_frameSizeInfo ZSTD_errorFrameSizeInfo(size_t ret)
{
ZSTD_frameSizeInfo frameSizeInfo;
frameSizeInfo.compressedSize = ret;
frameSizeInfo.decompressedBound = ZSTD_CONTENTSIZE_UNKNOWN;
frameSizeInfo.decompressedBound = ZSTD_CONTENTSIZE_ERROR;
return frameSizeInfo;
}