From: Volker Lendecke Date: Sun, 27 Mar 2011 18:03:23 +0000 (+0200) Subject: s3: Fix Coverity ID 958: BAD_SIZEOF X-Git-Tag: ldb-1.1.0~504 X-Git-Url: http://git.samba.org/samba.git/?a=commitdiff_plain;h=a431394ce37a3f647953969c85aac4415184a532;p=samba.git s3: Fix Coverity ID 958: BAD_SIZEOF This is supposed to wipe out the md5 context, not only the first bytes of it. Others, please check! --- diff --git a/lib/crypto/md5.c b/lib/crypto/md5.c index e6178cc015c..032474478ec 100644 --- a/lib/crypto/md5.c +++ b/lib/crypto/md5.c @@ -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 */