Skip to content

Commit

Permalink
field: Verify field element even after secp256k1_fe_set_b32 fails
Browse files Browse the repository at this point in the history
  • Loading branch information
real-or-random committed Feb 1, 2023
1 parent 8ebe5c5 commit d93f62e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/field_10x26_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -372,6 +372,7 @@ static int secp256k1_fe_set_b32(secp256k1_fe *r, const unsigned char *a) {
secp256k1_fe_verify(r);
} else {
r->normalized = 0;
secp256k1_fe_verify(r);
}
#endif
return ret;
Expand Down
1 change: 1 addition & 0 deletions src/field_5x52_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -347,6 +347,7 @@ static int secp256k1_fe_set_b32(secp256k1_fe *r, const unsigned char *a) {
secp256k1_fe_verify(r);
} else {
r->normalized = 0;
secp256k1_fe_verify(r);
}
#endif
return ret;
Expand Down

0 comments on commit d93f62e

Please sign in to comment.