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:
Simon Wilkinson
2012-03-31 19:06:59 -04:00
parent 15696d9b90
commit 10133ece1a

View File

@@ -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));
}