@@ -41,7 +41,7 @@ static void secp256k1_fe_get_hex(char *r, int *rlen, const secp256k1_fe_t *a) {
4141 r [64 ] = 0x00 ;
4242}
4343
44- static void secp256k1_fe_set_hex (secp256k1_fe_t * r , const char * a , int alen ) {
44+ static int secp256k1_fe_set_hex (secp256k1_fe_t * r , const char * a , int alen ) {
4545 unsigned char tmp [32 ] = {};
4646 static const int cvt [256 ] = {0 , 0 , 0 , 0 , 0 , 0 , 0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,
4747 0 , 0 , 0 , 0 , 0 , 0 , 0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,0 ,
@@ -63,7 +63,7 @@ static void secp256k1_fe_set_hex(secp256k1_fe_t *r, const char *a, int alen) {
6363 if (alen > i * 2 )
6464 tmp [32 - alen /2 + i ] = (cvt [(unsigned char )a [2 * i ]] << 4 ) + cvt [(unsigned char )a [2 * i + 1 ]];
6565 }
66- secp256k1_fe_set_b32 (r , tmp );
66+ return secp256k1_fe_set_b32 (r , tmp );
6767}
6868
6969static int secp256k1_fe_sqrt (secp256k1_fe_t * r , const secp256k1_fe_t * a ) {
@@ -212,7 +212,7 @@ static void secp256k1_fe_inv_var(secp256k1_fe_t *r, const secp256k1_fe_t *a) {
212212 secp256k1_num_set_bin (& n , b , 32 );
213213 secp256k1_num_mod_inverse (& n , & n , & secp256k1_fe_consts -> p );
214214 secp256k1_num_get_bin (b , 32 , & n );
215- secp256k1_fe_set_b32 (r , b );
215+ VERIFY_CHECK ( secp256k1_fe_set_b32 (r , b ) );
216216#else
217217#error "Please select field inverse implementation"
218218#endif
0 commit comments