forked from enlightenment/efl
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
This commit is contained in:
parent
2389d7f8ee
commit
3d269acefa
|
@ -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 */
|
||||
|
|
Loading…
Reference in New Issue