diff --git a/crypto/curve25519/x25519_test.cc b/crypto/curve25519/x25519_test.cc index 495741d027..99753ef87d 100644 --- a/crypto/curve25519/x25519_test.cc +++ b/crypto/curve25519/x25519_test.cc @@ -157,7 +157,9 @@ TEST(X25519Test, SmallOrder) { TEST(X25519Test, Iterated) { // Taken from https://tools.ietf.org/html/rfc7748#section-5.2. - uint8_t scalar[32] = {9}, point[32] = {9}, out[32]; + uint8_t scalar[32] = {}, point[32] = {}, out[32]; + scalar[0] = 9; + point[0] = 9; for (unsigned i = 0; i < 1000; i++) { EXPECT_TRUE(ctwrapX25519(out, scalar, point)); @@ -176,7 +178,9 @@ TEST(X25519Test, Iterated) { TEST(X25519Test, DISABLED_IteratedLarge) { // Taken from https://tools.ietf.org/html/rfc7748#section-5.2. - uint8_t scalar[32] = {9}, point[32] = {9}, out[32]; + uint8_t scalar[32] = {}, point[32] = {}, out[32]; + scalar[0] = 9; + point[0] = 9; for (unsigned i = 0; i < 1000000; i++) { EXPECT_TRUE(ctwrapX25519(out, scalar, point));