Skip to content

Commit

Permalink
Have secp256k1_gej_double_var initialize all fields.
Browse files Browse the repository at this point in the history
Previous behaviour would not initialize r->x and r->y values in the case where infinity is passed in.
  • Loading branch information
roconnor-blockstream committed May 4, 2021
1 parent dd6c3de commit 31c0f6d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/group_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ static void secp256k1_gej_double_var(secp256k1_gej *r, const secp256k1_gej *a, s
* point will be gibberish (z = 0 but infinity = 0).
*/
if (a->infinity) {
r->infinity = 1;
secp256k1_gej_set_infinity(r);
if (rzr != NULL) {
secp256k1_fe_set_int(rzr, 1);
}
Expand Down

0 comments on commit 31c0f6d

Please sign in to comment.