git.samba.org
/
samba.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8db0374
)
s3: Fix Coverity ID 958: BAD_SIZEOF
author
Volker Lendecke
<vl@samba.org>
Sun, 27 Mar 2011 18:03:23 +0000
(20:03 +0200)
committer
Volker 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
patch
|
blob
|
history
diff --git
a/lib/crypto/md5.c
b/lib/crypto/md5.c
index e6178cc015c5e0bed154c7a64c11cbe601b9a050..032474478ecc976a465d1ff776a5e43e3646179d 100644
(file)
--- 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 */