null decompress buffer test and ubsan flag added

This commit is contained in:
Danielle Rozenblit
2022-09-06 14:34:55 -07:00
parent 155d6a58a2
commit 69022ad886
3 changed files with 13 additions and 0 deletions
+9
View File
@@ -548,6 +548,15 @@ static int basicUnitTests(U32 seed, double compressibility)
{ size_t const ret = ZSTD_decompressStream(zd, &outBuff, &inBuff);
if (ret != 0) goto _output_error;
}
inBuff.src = NULL;
inBuff.size = 0;
inBuff.pos = 0;
outBuff.dst = NULL;
outBuff.size = 0;
outBuff.pos = 0;
CHECK_Z( ZSTD_initDStream(zd) );
CHECK_Z(ZSTD_decompressStream(zd, &outBuff, &inBuff));
DISPLAYLEVEL(3, "OK\n");
/* _srcSize compression test */
DISPLAYLEVEL(3, "test%3i : compress_srcSize %u bytes : ", testNb++, COMPRESSIBLE_NOISE_LENGTH);