Merge pull request #1547 from shakeelrao/fix-error

Fix incorrect error code in ZSTD_errorFrameSizeInfo
This commit is contained in:
Nick Terrell authored and GitHub committed 2019-03-15 10:57:49 -07:00
commit f52a7d8faa
3 files changed
+26 -6

No files matched your search

+7
View File
@@ -383,6 +383,13 @@ static int basicUnitTests(U32 seed, double compressibility)
}
DISPLAYLEVEL(3, "OK \n");
DISPLAYLEVEL(3, "test%3i : ZSTD_decompressBound test with invalid srcSize : ", testNb++);
{
unsigned long long bound = ZSTD_decompressBound(compressedBuffer, cSize - 1);
if (bound != ZSTD_CONTENTSIZE_ERROR) goto _output_error;
}
DISPLAYLEVEL(3, "OK \n");
DISPLAYLEVEL(3, "test%3i : decompress %u bytes : ", testNb++, (unsigned)CNBuffSize);
{ size_t const r = ZSTD_decompress(decodedBuffer, CNBuffSize, compressedBuffer, cSize);
if (r != CNBuffSize) goto _output_error; }