summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Schmidt <s.schmidt@samsung.com>2014-05-16 14:32:51 +0200
committerStefan Schmidt <s.schmidt@samsung.com>2014-05-16 14:32:51 +0200
commit3d269acefa5c558a800004c6137a4370089b179d (patch)
treee07d7f3a2745bac068707cc973410b0214eb465e
parent2389d7f8eeefa3dbb83046e9faa4ef6400ca946f (diff)
downloadefl-3d269acefa5c558a800004c6137a4370089b179d.tar.gz
ethumb: Memset whole contex in md5 implementation
I don't know what they tried here but if we consider the content of ctx sensitive we should memset the whole thing. CID 222382
-rw-r--r--src/lib/ethumb/md5.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/lib/ethumb/md5.c b/src/lib/ethumb/md5.c
index 9cfc8b5791..d43716672f 100644
--- a/src/lib/ethumb/md5.c
+++ b/src/lib/ethumb/md5.c
@@ -147,7 +147,7 @@ void MD5Final(unsigned char digest[16], MD5_CTX *ctx)
MD5Transform(ctx->buf, ctx->in.i);
byteReverse((unsigned char *) ctx->buf, 4);
memcpy(digest, ctx->buf, 16);
- memset((char *) ctx, 0, sizeof(ctx)); /* In case it's sensitive */
+ memset(ctx, 0, sizeof(MD5_CTX)); /* In case it's sensitive */
}
/* The four core functions - F1 is optimized somewhat */