Have secp256k1_gej_double_var initialize all fields.

Previous behaviour would not initialize r->x and r->y values in the case where infinity is passed in.
This commit is contained in:
Russell O'Connor 2021-05-04 15:49:48 -04:00
parent dd6c3de322
commit 31c0f6de41
1 changed files with 1 additions and 1 deletions

View File

@ -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). * point will be gibberish (z = 0 but infinity = 0).
*/ */
if (a->infinity) { if (a->infinity) {
r->infinity = 1; secp256k1_gej_set_infinity(r);
if (rzr != NULL) { if (rzr != NULL) {
secp256k1_fe_set_int(rzr, 1); secp256k1_fe_set_int(rzr, 1);
} }