From 31c0f6de413e521731ad0e63424431b3dd49cec8 Mon Sep 17 00:00:00 2001 From: Russell O'Connor Date: Tue, 4 May 2021 15:49:48 -0400 Subject: [PATCH] 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. --- src/group_impl.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/group_impl.h b/src/group_impl.h index 1b69082c21154..5ed45fda66998 100644 --- a/src/group_impl.h +++ b/src/group_impl.h @@ -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); }