s3: Fix Coverity ID 958: BAD_SIZEOF
authorVolker Lendecke <vl@samba.org>
Sun, 27 Mar 2011 18:03:23 +0000 (20:03 +0200)
committerVolker Lendecke <vl@samba.org>
Sun, 27 Mar 2011 20:22:10 +0000 (22:22 +0200)
This is supposed to wipe out the md5 context, not only the first bytes of it.

Others, please check!

lib/crypto/md5.c

index e6178cc015c5e0bed154c7a64c11cbe601b9a050..032474478ecc976a465d1ff776a5e43e3646179d 100644 (file)
@@ -144,7 +144,7 @@ _PUBLIC_ void MD5Final(uint8_t digest[16], struct MD5Context *ctx)
     MD5Transform(ctx->buf, (uint32_t *) ctx->in);
     byteReverse((uint8_t *) ctx->buf, 4);
     memmove(digest, ctx->buf, 16);
-    memset(ctx, 0, sizeof(ctx));       /* In case it's sensitive */
+    memset(ctx, 0, sizeof(*ctx));      /* In case it's sensitive */
 }
 
 /* The four core functions - F1 is optimized somewhat */