From e6d01e9347255eb9ad78608bfa3d11cba7655156 Mon Sep 17 00:00:00 2001 From: Pieter Wuille Date: Sat, 30 Mar 2019 12:54:44 -0700 Subject: [PATCH] Use size_t shifts when computing a size_t --- src/ecmult_impl.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ecmult_impl.h b/src/ecmult_impl.h index cbafd07e35b21..1986914a4fd5d 100644 --- a/src/ecmult_impl.h +++ b/src/ecmult_impl.h @@ -960,7 +960,7 @@ static size_t secp256k1_pippenger_scratch_size(size_t n_points, int bucket_windo size_t entries = n_points + 1; #endif size_t entry_size = sizeof(secp256k1_ge) + sizeof(secp256k1_scalar) + sizeof(struct secp256k1_pippenger_point_state) + (WNAF_SIZE(bucket_window+1)+1)*sizeof(int); - return ((1<ps = (struct secp256k1_pippenger_point_state *) secp256k1_scratch_alloc(scratch, entries * sizeof(*state_space->ps)); state_space->wnaf_na = (int *) secp256k1_scratch_alloc(scratch, entries*(WNAF_SIZE(bucket_window+1)) * sizeof(int)); - buckets = (secp256k1_gej *) secp256k1_scratch_alloc(scratch, (1< max_alloc) { break; }