Skip to content

Commit

Permalink
Clarify array lengths in ecp_nistz256_select_w{5, 7}.
Browse files Browse the repository at this point in the history
The compiler is supposed to ignore these unless they are marked
"static" so the mistake was benign.
  • Loading branch information
briansmith committed Jul 7, 2016
1 parent 69d9b6a commit 5fd8301
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crypto/ec/gfp_p256.c
Expand Up @@ -255,7 +255,7 @@ OPENSSL_COMPILE_ASSERT(sizeof(size_t) == sizeof(GFp_Limb),
size_t_and_gfp_limb_are_different_sizes);


void ecp_nistz256_select_w5(P256_POINT *out, const P256_POINT table[15],
void ecp_nistz256_select_w5(P256_POINT *out, const P256_POINT table[16],
int index) {
assert(index >= 0);
size_t index_as_size_t = (size_t)index; /* XXX: constant time? */
Expand All @@ -279,7 +279,7 @@ void ecp_nistz256_select_w5(P256_POINT *out, const P256_POINT table[15],
}

void ecp_nistz256_select_w7(P256_POINT_AFFINE *out,
const P256_POINT_AFFINE table[63], int index) {
const P256_POINT_AFFINE table[64], int index) {
assert(index >= 0);
size_t index_as_size_t = (size_t)index; /* XXX: constant time? */

Expand Down

0 comments on commit 5fd8301

Please sign in to comment.