diff --git a/crypto/fipsmodule/ec/ec_montgomery.c b/crypto/fipsmodule/ec/ec_montgomery.c index 92289a5ed4..83afca3ad0 100644 --- a/crypto/fipsmodule/ec/ec_montgomery.c +++ b/crypto/fipsmodule/ec/ec_montgomery.c @@ -335,7 +335,11 @@ void ec_GFp_mont_dbl(const EC_GROUP *group, EC_JACOBIAN *r, // Coq transcription and correctness proof: // // - EC_FELEM delta, gamma, beta, ftmp, ftmp2, tmptmp, alpha, fourbeta; + + // Initialize variables to avoid "may be used uninitialized" warning. + // https://github.com/aws/aws-lc/issues/1185 + EC_FELEM delta = {{0}}, gamma = {{0}}, beta = {{0}}, ftmp = {{0}}, ftmp2 = {{0}}, tmptmp = {{0}}, alpha = {{0}}, fourbeta = {{0}}; + // delta = z^2 ec_GFp_mont_felem_sqr(group, &delta, &a->Z); // gamma = y^2