diff options
author | deraadt <> | 2014-05-31 18:49:47 +0000 |
---|---|---|
committer | deraadt <> | 2014-05-31 18:49:47 +0000 |
commit | d70bd5a62f66955d277b33d3f091f89b03118c59 (patch) | |
tree | 54e56022a23904df3297a977eb20c8b5484f7a01 | |
parent | 3907ffc6a9398249e7ba57c72ec0911e9e0fb5c6 (diff) | |
download | openbsd-d70bd5a62f66955d277b33d3f091f89b03118c59.tar.gz openbsd-d70bd5a62f66955d277b33d3f091f89b03118c59.tar.bz2 openbsd-d70bd5a62f66955d277b33d3f091f89b03118c59.zip |
copy a comment placed in other files; req from miod
Diffstat (limited to '')
-rw-r--r-- | src/lib/libcrypto/ec/ecp_nistp224.c | 4 | ||||
-rw-r--r-- | src/lib/libssl/src/crypto/ec/ecp_nistp224.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/lib/libcrypto/ec/ecp_nistp224.c b/src/lib/libcrypto/ec/ecp_nistp224.c index afe25853e6..17777f517b 100644 --- a/src/lib/libcrypto/ec/ecp_nistp224.c +++ b/src/lib/libcrypto/ec/ecp_nistp224.c | |||
@@ -1437,9 +1437,11 @@ ec_GFp_nistp224_points_mul(const EC_GROUP * group, EC_POINT * r, | |||
1437 | } | 1437 | } |
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 | /* XXX should do more int overflow checking */ | ||
1441 | tmp_felems = reallocarray(NULL, | 1442 | tmp_felems = reallocarray(NULL, |
1442 | (num_points * 17 + 1), sizeof(felem)); | 1443 | (num_points * 17 + 1), sizeof(felem)); |
1444 | } | ||
1443 | if ((secrets == NULL) || (pre_comp == NULL) || (mixed && (tmp_felems == NULL))) { | 1445 | if ((secrets == NULL) || (pre_comp == NULL) || (mixed && (tmp_felems == NULL))) { |
1444 | ECerr(EC_F_EC_GFP_NISTP224_POINTS_MUL, ERR_R_MALLOC_FAILURE); | 1446 | ECerr(EC_F_EC_GFP_NISTP224_POINTS_MUL, ERR_R_MALLOC_FAILURE); |
1445 | goto err; | 1447 | goto err; |
diff --git a/src/lib/libssl/src/crypto/ec/ecp_nistp224.c b/src/lib/libssl/src/crypto/ec/ecp_nistp224.c index afe25853e6..17777f517b 100644 --- a/src/lib/libssl/src/crypto/ec/ecp_nistp224.c +++ b/src/lib/libssl/src/crypto/ec/ecp_nistp224.c | |||
@@ -1437,9 +1437,11 @@ ec_GFp_nistp224_points_mul(const EC_GROUP * group, EC_POINT * r, | |||
1437 | } | 1437 | } |
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 | /* XXX should do more int overflow checking */ | ||
1441 | tmp_felems = reallocarray(NULL, | 1442 | tmp_felems = reallocarray(NULL, |
1442 | (num_points * 17 + 1), sizeof(felem)); | 1443 | (num_points * 17 + 1), sizeof(felem)); |
1444 | } | ||
1443 | if ((secrets == NULL) || (pre_comp == NULL) || (mixed && (tmp_felems == NULL))) { | 1445 | if ((secrets == NULL) || (pre_comp == NULL) || (mixed && (tmp_felems == NULL))) { |
1444 | ECerr(EC_F_EC_GFP_NISTP224_POINTS_MUL, ERR_R_MALLOC_FAILURE); | 1446 | ECerr(EC_F_EC_GFP_NISTP224_POINTS_MUL, ERR_R_MALLOC_FAILURE); |
1445 | goto err; | 1447 | goto err; |