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
1 changed files with 1 additions and 1 deletions

View File

@ -147,7 +147,7 @@ static void MD5_Update(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);
if(length == 16)
CryptGetHashParam(ctx->hHash, HP_HASHVAL, digest, &length, 0);