sha256: fixed potentially uninitialized variable

Closes #5414
This commit is contained in:
Siva Sivaraman 2020-05-18 08:59:31 -07:00 committed by Daniel Stenberg
parent 74623551f3
commit fae3065676
No known key found for this signature in database
GPG Key ID: 5CC908FDB71E12C2
1 changed files with 1 additions and 0 deletions

View File

@ -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)