diff options
Diffstat (limited to 'src/lib/libcrypto/ec/ecp_nistp224.c')
-rw-r--r-- | src/lib/libcrypto/ec/ecp_nistp224.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/lib/libcrypto/ec/ecp_nistp224.c b/src/lib/libcrypto/ec/ecp_nistp224.c index 53aced54d5..6e9b9fac3c 100644 --- a/src/lib/libcrypto/ec/ecp_nistp224.c +++ b/src/lib/libcrypto/ec/ecp_nistp224.c | |||
@@ -1438,7 +1438,8 @@ ec_GFp_nistp224_points_mul(const EC_GROUP * group, EC_POINT * r, | |||
1438 | secrets = calloc(num_points, sizeof(felem_bytearray)); | 1438 | secrets = calloc(num_points, sizeof(felem_bytearray)); |
1439 | pre_comp = calloc(num_points, 17 * 3 * sizeof(felem)); | 1439 | pre_comp = calloc(num_points, 17 * 3 * sizeof(felem)); |
1440 | if (mixed) | 1440 | if (mixed) |
1441 | tmp_felems = malloc((num_points * 17 + 1) * sizeof(felem)); | 1441 | tmp_felems = reallocarray(NULL, |
1442 | (num_points * 17 + 1), sizeof(felem)); | ||
1442 | if ((secrets == NULL) || (pre_comp == NULL) || (mixed && (tmp_felems == NULL))) { | 1443 | if ((secrets == NULL) || (pre_comp == NULL) || (mixed && (tmp_felems == NULL))) { |
1443 | ECerr(EC_F_EC_GFP_NISTP224_POINTS_MUL, ERR_R_MALLOC_FAILURE); | 1444 | ECerr(EC_F_EC_GFP_NISTP224_POINTS_MUL, ERR_R_MALLOC_FAILURE); |
1444 | goto err; | 1445 | goto err; |