Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/boringssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/crypto/ec
diff options
context:
space:
mode:
authorDavid Benjamin <davidben@chromium.org>2015-12-11 23:31:07 +0300
committerAdam Langley <agl@google.com>2015-12-17 00:19:32 +0300
commit4ec0cce743d0aaa2f10ad6cd17c7e4f6d4f5ff4c (patch)
treecd2d4c0150036a5c9a2e3ef3e4fc8c4df6888d76 /crypto/ec
parent2936170d68ec617e1e6f0c2def86728ba29312b7 (diff)
Slightly tweak some array allocations.
clang scan-build is annoyed it's not obvious the sizeof line matches the pointer type. This is easy to fix and makes it be quiet. Change-Id: Iec80d2a087f81179c88cae300f56d3f76b32b347 Reviewed-on: https://boringssl-review.googlesource.com/6701 Reviewed-by: Adam Langley <agl@google.com>
Diffstat (limited to 'crypto/ec')
-rw-r--r--crypto/ec/p224-64.c2
-rw-r--r--crypto/ec/p256-64.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/crypto/ec/p224-64.c b/crypto/ec/p224-64.c
index 3e90f43e..e026fc47 100644
--- a/crypto/ec/p224-64.c
+++ b/crypto/ec/p224-64.c
@@ -1171,7 +1171,7 @@ int ec_GFp_nistp224_points_mul(const EC_GROUP *group, EC_POINT *r,
mixed = 1;
}
secrets = OPENSSL_malloc(num_points * sizeof(felem_bytearray));
- pre_comp = OPENSSL_malloc(num_points * 17 * 3 * sizeof(felem));
+ pre_comp = OPENSSL_malloc(num_points * sizeof(felem[17][3]));
if (mixed) {
tmp_felems = OPENSSL_malloc((num_points * 17 + 1) * sizeof(felem));
}
diff --git a/crypto/ec/p256-64.c b/crypto/ec/p256-64.c
index 75b1cabc..32852dd6 100644
--- a/crypto/ec/p256-64.c
+++ b/crypto/ec/p256-64.c
@@ -1750,7 +1750,7 @@ int ec_GFp_nistp256_points_mul(const EC_GROUP *group, EC_POINT *r,
mixed = 1;
}
secrets = OPENSSL_malloc(num_points * sizeof(felem_bytearray));
- pre_comp = OPENSSL_malloc(num_points * 17 * 3 * sizeof(smallfelem));
+ pre_comp = OPENSSL_malloc(num_points * sizeof(smallfelem[17][3]));
if (mixed) {
tmp_smallfelems =
OPENSSL_malloc((num_points * 17 + 1) * sizeof(smallfelem));