VERIFY_CHECK precondition for secp256k1_fe_set_int.

This commit is contained in:
Russell O'Connor
2021-05-13 10:40:50 -04:00
parent d49011f54c
commit 2888640132
3 changed files with 5 additions and 2 deletions

View File

@@ -227,6 +227,7 @@ static int secp256k1_fe_normalizes_to_zero_var(const secp256k1_fe *r) {
}
SECP256K1_INLINE static void secp256k1_fe_set_int(secp256k1_fe *r, int a) {
VERIFY_CHECK(0 <= a && a <= 0x7FFF);
r->n[0] = a;
r->n[1] = r->n[2] = r->n[3] = r->n[4] = 0;
#ifdef VERIFY