hcrypto: Use correct size for memset in md2
md2.c was doing memset(m, 0, sizeof(m)), and so was only clearing the first 4 bytes of the passed md2 structure in MD2_Final. Fix this to clear the entire structure, as expected.
This commit is contained in:
@@ -130,5 +130,5 @@ MD2_Final (void *res, struct md2 *m)
|
||||
MD2_Update(m, pad, 16);
|
||||
|
||||
memcpy(res, m->state, MD2_DIGEST_LENGTH);
|
||||
memset(m, 0, sizeof(m));
|
||||
memset(m, 0, sizeof(*m));
|
||||
}
|
||||
|
Reference in New Issue
Block a user