ecmult: Use size_t for array indices into tables

This commit is contained in:
Tim Ruffing
2026-01-07 11:30:16 +01:00
parent 2d9137ce9d
commit bb1d199de5
4 changed files with 17 additions and 16 deletions

View File

@@ -38,7 +38,7 @@
#endif
/** The number of entries a table with precomputed multiples needs to have. */
#define ECMULT_TABLE_SIZE(w) (1L << ((w)-2))
#define ECMULT_TABLE_SIZE(w) ((size_t)1 << ((w)-2))
/** Double multiply: R = na*A + ng*G */
static void secp256k1_ecmult(secp256k1_gej *r, const secp256k1_gej *a, const secp256k1_scalar *na, const secp256k1_scalar *ng);