summaryrefslogtreecommitdiff
path: root/src/lib/ethumb
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 /src/lib/ethumb
parent2389d7f8eeefa3dbb83046e9faa4ef6400ca946f (diff)
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
Diffstat (limited to 'src/lib/ethumb')
-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)
147 MD5Transform(ctx->buf, ctx->in.i); 147 MD5Transform(ctx->buf, ctx->in.i);
148 byteReverse((unsigned char *) ctx->buf, 4); 148 byteReverse((unsigned char *) ctx->buf, 4);
149 memcpy(digest, ctx->buf, 16); 149 memcpy(digest, ctx->buf, 16);
150 memset((char *) ctx, 0, sizeof(ctx)); /* In case it's sensitive */ 150 memset(ctx, 0, sizeof(MD5_CTX)); /* In case it's sensitive */
151} 151}
152 152
153/* The four core functions - F1 is optimized somewhat */ 153/* The four core functions - F1 is optimized somewhat */