Mark some unmarked array sizes in curve25519.c. Change-Id: I92589f5d5e89c836cff3c26739b43eb65de67836 Reviewed-on: https://boringssl-review.googlesource.com/c/34304 Commit-Queue: Adam Langley <agl@google.com> Reviewed-by: Adam Langley <agl@google.com>
diff --git a/third_party/fiat/curve25519.c b/third_party/fiat/curve25519.c index 15623c6..b64956e 100644 --- a/third_party/fiat/curve25519.c +++ b/third_party/fiat/curve25519.c
@@ -170,7 +170,7 @@ } \ } while (0) -static void fe_frombytes_impl(uint64_t h[5], const uint8_t *s) { +static void fe_frombytes_impl(uint64_t h[5], const uint8_t s[32]) { // Ignores top bit of s. uint64_t a0 = load_8(s); uint64_t a1 = load_8(s+8); @@ -189,7 +189,7 @@ assert_fe(h); } -static void fe_frombytes(fe *h, const uint8_t *s) { +static void fe_frombytes(fe *h, const uint8_t s[32]) { fe_frombytes_impl(h->v, s); } @@ -645,7 +645,7 @@ } \ } while (0) -static void fe_frombytes_impl(uint32_t h[10], const uint8_t *s) { +static void fe_frombytes_impl(uint32_t h[10], const uint8_t s[32]) { // Ignores top bit of s. uint32_t a0 = load_4(s); uint32_t a1 = load_4(s+4); @@ -668,7 +668,7 @@ assert_fe(h); } -static void fe_frombytes(fe *h, const uint8_t *s) { +static void fe_frombytes(fe *h, const uint8_t s[32]) { fe_frombytes_impl(h->v, s); } @@ -1584,7 +1584,7 @@ s[31] ^= fe_isnegative(&x) << 7; } -int x25519_ge_frombytes_vartime(ge_p3 *h, const uint8_t *s) { +int x25519_ge_frombytes_vartime(ge_p3 *h, const uint8_t s[32]) { fe u; fe_loose v; fe v3;