summaryrefslogtreecommitdiff
path: root/lib/sha256.c
diff options
context:
space:
mode:
authorSiva Sivaraman <kasivara@microsoft.com>2020-05-18 08:59:31 -0700
committerDaniel Stenberg <daniel@haxx.se>2020-05-19 08:47:12 +0200
commitfae3065676f1f2064f574f87d9c5003063e8963b (patch)
tree2d965fddb1dea508c96a92935ca13155259988ac /lib/sha256.c
parent74623551f306990e70c7c5515b88972005604a74 (diff)
downloadcurl-fae3065676f1f2064f574f87d9c5003063e8963b.tar.gz
sha256: fixed potentially uninitialized variable
Closes #5414
Diffstat (limited to 'lib/sha256.c')
-rw-r--r--lib/sha256.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/sha256.c b/lib/sha256.c
index a3be92a4e..aebcc55b2 100644
--- a/lib/sha256.c
+++ b/lib/sha256.c
@@ -224,6 +224,7 @@ static void SHA256_Update(SHA256_CTX *ctx,
static void SHA256_Final(unsigned char *digest, SHA256_CTX *ctx)
{
unsigned long length;
+ length = 0;
CryptGetHashParam(ctx->hHash, HP_HASHVAL, NULL, &length, 0);
if(length == SHA256_DIGEST_LENGTH)