From: Richard Levitte Date: Wed, 21 May 2003 08:40:06 +0000 (+0000) Subject: Make sure EC_window_bits_for_scalar_size() returns a size_t X-Git-Tag: BEN_FIPS_TEST_1~38^2~96 X-Git-Url: https://git.openssl.org/?p=openssl.git;a=commitdiff_plain;h=513c01a591d2c55e61006c1e8f26c16e9dc55307 Make sure EC_window_bits_for_scalar_size() returns a size_t --- diff --git a/crypto/ec/ec_mult.c b/crypto/ec/ec_mult.c index c71a69ac0d..236b66c18a 100644 --- a/crypto/ec/ec_mult.c +++ b/crypto/ec/ec_mult.c @@ -307,12 +307,13 @@ static signed char *compute_wNAF(const BIGNUM *scalar, int w, size_t *ret_len) * (thus the boundaries should be increased) */ #define EC_window_bits_for_scalar_size(b) \ - ((b) >= 2000 ? 6 : \ - (b) >= 800 ? 5 : \ - (b) >= 300 ? 4 : \ - (b) >= 70 ? 3 : \ - (b) >= 20 ? 2 : \ - 1) + ((size_t) \ + ((b) >= 2000 ? 6 : \ + (b) >= 800 ? 5 : \ + (b) >= 300 ? 4 : \ + (b) >= 70 ? 3 : \ + (b) >= 20 ? 2 : \ + 1)) /* Compute * \sum scalars[i]*points[i],