Add check that restrict pointers don't alias with all parameters.

This commit is contained in:
Russell O'Connor
2018-07-06 07:26:57 -04:00
parent 95e99f196f
commit 4efb3f8dd1
3 changed files with 3 additions and 0 deletions

View File

@@ -422,6 +422,7 @@ static void secp256k1_fe_mul(secp256k1_fe *r, const secp256k1_fe *a, const secp2
secp256k1_fe_verify(a);
secp256k1_fe_verify(b);
VERIFY_CHECK(r != b);
VERIFY_CHECK(a != b);
#endif
secp256k1_fe_mul_inner(r->n, a->n, b->n);
#ifdef VERIFY