1
0
mirror of https://github.com/moparisthebest/curl synced 2024-12-22 16:18:48 -05:00

md5.c: fix use of uninitialized variable

This commit is contained in:
Marc Hoersken 2014-04-18 22:59:25 +02:00
parent 6f72c2fe31
commit 54df616729

View File

@ -147,7 +147,7 @@ static void MD5_Update(MD5_CTX *ctx,
static void MD5_Final(unsigned char digest[16], MD5_CTX *ctx) static void MD5_Final(unsigned char digest[16], MD5_CTX *ctx)
{ {
unsigned long length; unsigned long length = 0;
CryptGetHashParam(ctx->hHash, HP_HASHVAL, NULL, &length, 0); CryptGetHashParam(ctx->hHash, HP_HASHVAL, NULL, &length, 0);
if(length == 16) if(length == 16)
CryptGetHashParam(ctx->hHash, HP_HASHVAL, digest, &length, 0); CryptGetHashParam(ctx->hHash, HP_HASHVAL, digest, &length, 0);