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>
This commit is contained in:
parent
2936170d68
commit
4ec0cce743
@ -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));
|
||||
}
|
||||
|
@ -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));
|
||||
|
Loading…
Reference in New Issue
Block a user