Skip to content

Commit

Permalink
pubkey_load: replace ARG_CHECK with VERIFY_CHECK
Browse files Browse the repository at this point in the history
This change prepares for the addition of ge_from_bytes and ge_to_bytes which do
not take a context. This change should be inconsequential because it's very
unlikely to land in the `sizeof(secp256k1_ge_storage) != 64` branch and the
other branch does not have an ARG_CHECK either.
  • Loading branch information
jonasnick committed Jan 6, 2024
1 parent 1a8f4c2 commit f6d9a11
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/secp256k1.c
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,11 @@ static int secp256k1_pubkey_load(const secp256k1_context* ctx, secp256k1_ge* ge,
} else {
/* Otherwise, fall back to 32-byte big endian for X and Y. */
secp256k1_fe x, y;
ARG_CHECK(secp256k1_fe_set_b32_limit(&x, pubkey->data));
ARG_CHECK(secp256k1_fe_set_b32_limit(&y, pubkey->data + 32));
int ret = 1;

ret &= secp256k1_fe_set_b32_limit(&x, pubkey->data);
ret &= secp256k1_fe_set_b32_limit(&y, pubkey->data + 32);
VERIFY_CHECK(ret);
secp256k1_ge_set_xy(ge, &x, &y);
}
ARG_CHECK(!secp256k1_fe_is_zero(&ge->x));
Expand Down

0 comments on commit f6d9a11

Please sign in to comment.