diff --git a/src/modules/musig/keyagg_impl.h b/src/modules/musig/keyagg_impl.h index 0419a1510..aeb942ac8 100644 --- a/src/modules/musig/keyagg_impl.h +++ b/src/modules/musig/keyagg_impl.h @@ -41,8 +41,10 @@ static void secp256k1_point_load(secp256k1_ge *ge, const unsigned char *data) { } else { /* Otherwise, fall back to 32-byte big endian for X and Y. */ secp256k1_fe x, y; - secp256k1_fe_set_b32_mod(&x, data); - secp256k1_fe_set_b32_mod(&y, data + 32); + int ret = 1; + ret &= secp256k1_fe_set_b32_limit(&x, data); + ret &= secp256k1_fe_set_b32_limit(&y, data + 32); + VERIFY_CHECK(ret); secp256k1_ge_set_xy(ge, &x, &y); } }