summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/bn/bn_gf2m.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/bn/bn_gf2m.c')
-rw-r--r--src/lib/libcrypto/bn/bn_gf2m.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/lib/libcrypto/bn/bn_gf2m.c b/src/lib/libcrypto/bn/bn_gf2m.c
index 4bd50924d3..f451befb0d 100644
--- a/src/lib/libcrypto/bn/bn_gf2m.c
+++ b/src/lib/libcrypto/bn/bn_gf2m.c
@@ -547,7 +547,7 @@ BN_GF2m_mod_mul(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *p,
547 bn_check_top(a); 547 bn_check_top(a);
548 bn_check_top(b); 548 bn_check_top(b);
549 bn_check_top(p); 549 bn_check_top(p);
550 if ((arr = reallocarray(NULL, sizeof(int), max)) == NULL) 550 if ((arr = reallocarray(NULL, max, sizeof(int))) == NULL)
551 goto err; 551 goto err;
552 ret = BN_GF2m_poly2arr(p, arr, max); 552 ret = BN_GF2m_poly2arr(p, arr, max);
553 if (!ret || ret > max) { 553 if (!ret || ret > max) {
@@ -609,7 +609,7 @@ BN_GF2m_mod_sqr(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx)
609 609
610 bn_check_top(a); 610 bn_check_top(a);
611 bn_check_top(p); 611 bn_check_top(p);
612 if ((arr = reallocarray(NULL, sizeof(int), max)) == NULL) 612 if ((arr = reallocarray(NULL, max, sizeof(int))) == NULL)
613 goto err; 613 goto err;
614 ret = BN_GF2m_poly2arr(p, arr, max); 614 ret = BN_GF2m_poly2arr(p, arr, max);
615 if (!ret || ret > max) { 615 if (!ret || ret > max) {
@@ -1037,7 +1037,7 @@ BN_GF2m_mod_exp(BIGNUM *r, const BIGNUM *a, const BIGNUM *b, const BIGNUM *p,
1037 bn_check_top(a); 1037 bn_check_top(a);
1038 bn_check_top(b); 1038 bn_check_top(b);
1039 bn_check_top(p); 1039 bn_check_top(p);
1040 if ((arr = reallocarray(NULL, sizeof(int), max)) == NULL) 1040 if ((arr = reallocarray(NULL, max, sizeof(int))) == NULL)
1041 goto err; 1041 goto err;
1042 ret = BN_GF2m_poly2arr(p, arr, max); 1042 ret = BN_GF2m_poly2arr(p, arr, max);
1043 if (!ret || ret > max) { 1043 if (!ret || ret > max) {
@@ -1099,7 +1099,7 @@ BN_GF2m_mod_sqrt(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx)
1099 int *arr = NULL; 1099 int *arr = NULL;
1100 bn_check_top(a); 1100 bn_check_top(a);
1101 bn_check_top(p); 1101 bn_check_top(p);
1102 if ((arr = reallocarray(NULL, sizeof(int), max)) == NULL) 1102 if ((arr = reallocarray(NULL, max, sizeof(int))) == NULL)
1103 goto err; 1103 goto err;
1104 ret = BN_GF2m_poly2arr(p, arr, max); 1104 ret = BN_GF2m_poly2arr(p, arr, max);
1105 if (!ret || ret > max) { 1105 if (!ret || ret > max) {
@@ -1234,7 +1234,7 @@ BN_GF2m_mod_solve_quad(BIGNUM *r, const BIGNUM *a, const BIGNUM *p, BN_CTX *ctx)
1234 1234
1235 bn_check_top(a); 1235 bn_check_top(a);
1236 bn_check_top(p); 1236 bn_check_top(p);
1237 if ((arr = reallocarray(NULL, sizeof(int), max)) == NULL) 1237 if ((arr = reallocarray(NULL, max, sizeof(int))) == NULL)
1238 goto err; 1238 goto err;
1239 ret = BN_GF2m_poly2arr(p, arr, max); 1239 ret = BN_GF2m_poly2arr(p, arr, max);
1240 if (!ret || ret > max) { 1240 if (!ret || ret > max) {