Skip to content

Commit

Permalink
Init variable to avoid "may be used uninitialized" warning
Browse files Browse the repository at this point in the history
Similar issues here: #1185

Causes CI fails
  • Loading branch information
manastasova committed Jan 13, 2025
1 parent 6393e80 commit 9424cfa
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion crypto/fipsmodule/ec/ec_montgomery.c
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,11 @@ void ec_GFp_mont_dbl(const EC_GROUP *group, EC_JACOBIAN *r,
// Coq transcription and correctness proof:
// <https://github.com/mit-plv/fiat-crypto/blob/79f8b5f39ed609339f0233098dee1a3c4e6b3080/src/Curves/Weierstrass/Jacobian.v#L93>
// <https://github.com/mit-plv/fiat-crypto/blob/79f8b5f39ed609339f0233098dee1a3c4e6b3080/src/Curves/Weierstrass/Jacobian.v#L201>
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
Expand Down

0 comments on commit 9424cfa

Please sign in to comment.