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: aws#1185

Causes CI fails
  • Loading branch information
manastasova committed Jan 13, 2025
1 parent f48fb78 commit be28533
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion crypto/fipsmodule/ec/ec_montgomery.c
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,10 @@ 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 be28533

Please sign in to comment.