hcrypto: Fix warning in HMAC_Init_ex()

This commit is contained in:
Nicolas Williams
2022-12-30 16:38:55 -06:00
parent 20c4c0dea9
commit 274b683d76
5 changed files with 24 additions and 5 deletions

View File

@@ -39,7 +39,7 @@ mp_err s_mp_prime_random_ex(mp_int *a, int t, int size, int flags, private_mp_pr
bsize = (size>>3) + ((size&7)?1:0);
/* we need a buffer of bsize bytes */
tmp = (unsigned char *) MP_MALLOC((size_t)bsize);
tmp = (unsigned char *) MP_CALLOC(1, (size_t)bsize);
if (tmp == NULL) {
return MP_MEM;
}