]> git.ipfire.org Git - thirdparty/zstd.git/commitdiff
Initialize dctx->bType to silence valgrind false positive 1972/head
authorNick Terrell <terrelln@fb.com>
Fri, 24 Jan 2020 01:54:48 +0000 (17:54 -0800)
committerNick Terrell <terrelln@fb.com>
Fri, 24 Jan 2020 01:54:48 +0000 (17:54 -0800)
lib/decompress/zstd_decompress.c

index 8ca7c5e418993b2b5082b7b6f0ce5636492609a1..f87e261841828380cb3dd9195881ac5edeac9b37 100644 (file)
@@ -1159,6 +1159,7 @@ size_t ZSTD_decompressBegin(ZSTD_DCtx* dctx)
     dctx->entropy.hufTable[0] = (HUF_DTable)((HufLog)*0x1000001);  /* cover both little and big endian */
     dctx->litEntropy = dctx->fseEntropy = 0;
     dctx->dictID = 0;
+    dctx->bType = bt_reserved;
     ZSTD_STATIC_ASSERT(sizeof(dctx->entropy.rep) == sizeof(repStartValue));
     memcpy(dctx->entropy.rep, repStartValue, sizeof(repStartValue));  /* initial repcodes */
     dctx->LLTptr = dctx->entropy.LLTable;