File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed
Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -683,7 +683,7 @@ static int secp256k1_ecmult_pippenger_batch(const secp256k1_callback* error_call
683683 }
684684 state_space -> ps = (struct secp256k1_pippenger_point_state * ) secp256k1_scratch_alloc (error_callback , scratch , entries * sizeof (* state_space -> ps ));
685685 state_space -> wnaf_na = (int * ) secp256k1_scratch_alloc (error_callback , scratch , entries * (WNAF_SIZE (bucket_window + 1 )) * sizeof (int ));
686- buckets = (secp256k1_gej * ) secp256k1_scratch_alloc (error_callback , scratch , (1 << bucket_window ) * sizeof (* buckets ));
686+ buckets = (secp256k1_gej * ) secp256k1_scratch_alloc (error_callback , scratch , (( size_t ) 1 << bucket_window ) * sizeof (* buckets ));
687687 if (state_space -> ps == NULL || state_space -> wnaf_na == NULL || buckets == NULL ) {
688688 secp256k1_scratch_apply_checkpoint (error_callback , scratch , scratch_checkpoint );
689689 return 0 ;
Original file line number Diff line number Diff line change @@ -2221,7 +2221,7 @@ static void scalar_test(void) {
22212221 for (i = 0 ; i < 100 ; ++ i ) {
22222222 int low ;
22232223 int shift = 1 + secp256k1_testrand_int (15 );
2224- int expected = r .d [0 ] % (1 << shift );
2224+ int expected = r .d [0 ] % (1ULL << shift );
22252225 low = secp256k1_scalar_shr_int (& r , shift );
22262226 CHECK (expected == low );
22272227 }
You can’t perform that action at this time.
0 commit comments