]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Fixing appveyor test
authorBimba Shrestha <bimbashrestha@fb.com>
Thu, 26 Sep 2019 23:21:57 +0000 (16:21 -0700)
committerBimba Shrestha <bimbashrestha@fb.com>
Thu, 26 Sep 2019 23:21:57 +0000 (16:21 -0700)
tests/fuzzer.c

index c368797471387a5be2b9e1420b36a98ec2b456f3..0b935c8255f5648a4efd123f412a6e6fa20fc68a 100644 (file)
@@ -1987,10 +1987,11 @@ static int basicUnitTests(U32 const seed, double compressibility)
         BYTE* decoded = (BYTE*)compressedBuffer;
 
         ZSTD_CCtx* cctx = ZSTD_createCCtx();
-        ZSTD_Sequence* seqs = malloc(srcSize * sizeof(ZSTD_Sequence));
+        ZSTD_Sequence* seqs = (ZSTD_Sequence*)malloc(srcSize * sizeof(ZSTD_Sequence));
         size_t seqsSize; size_t i;
         U32 randSeed = seed;
 
+        if (seqs == NULL) goto _output_error;
         assert(cctx != NULL);
 
         /* Populate src with random data */