summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2014-05-31 18:49:48 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2014-05-31 18:49:48 +0000
commit87711ccf5ddb1bb69163731af7a92fded27f9189 (patch)
treebfdcd416dc8fe20c6f52987bdd62a0edc327c9e1
parenta82aaa94f5e03070576358857716a12d8ff91a30 (diff)
copy a comment placed in other files; req from miod
-rw-r--r--lib/libcrypto/ec/ecp_nistp224.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/libcrypto/ec/ecp_nistp224.c b/lib/libcrypto/ec/ecp_nistp224.c
index afe25853e6b..17777f517b7 100644
--- a/lib/libcrypto/ec/ecp_nistp224.c
+++ b/lib/libcrypto/ec/ecp_nistp224.c
@@ -1437,9 +1437,11 @@ ec_GFp_nistp224_points_mul(const EC_GROUP * group, EC_POINT * r,
}
secrets = calloc(num_points, sizeof(felem_bytearray));
pre_comp = calloc(num_points, 17 * 3 * sizeof(felem));
- if (mixed)
+ if (mixed) {
+ /* XXX should do more int overflow checking */
tmp_felems = reallocarray(NULL,
(num_points * 17 + 1), sizeof(felem));
+ }
if ((secrets == NULL) || (pre_comp == NULL) || (mixed && (tmp_felems == NULL))) {
ECerr(EC_F_EC_GFP_NISTP224_POINTS_MUL, ERR_R_MALLOC_FAILURE);
goto err;