]> granicus.if.org Git - curl/commitdiff
md5.c: fix use of uninitialized variable
authorMarc Hoersken <info@marc-hoersken.de>
Fri, 18 Apr 2014 20:59:25 +0000 (22:59 +0200)
committerMarc Hoersken <info@marc-hoersken.de>
Fri, 18 Apr 2014 20:59:25 +0000 (22:59 +0200)
lib/md5.c

index d8344dbe43796936cff38f2fbad87167e68e1958..af39fd41a773f8afd7d8a70e920f13286a1f8d77 100644 (file)
--- a/lib/md5.c
+++ b/lib/md5.c
@@ -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);