Commit 513c01a5 authored by Richard Levitte's avatar Richard Levitte
Browse files

Make sure EC_window_bits_for_scalar_size() returns a size_t

parent d9a2a89a
Loading
Loading
Loading
Loading
+7 −6
Original line number Diff line number Diff line
@@ -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) \
		((size_t) \
		 ((b) >= 2000 ? 6 : \
		  (b) >=  800 ? 5 : \
		  (b) >=  300 ? 4 : \
		  (b) >=   70 ? 3 : \
		  (b) >=   20 ? 2 : \
		  1)
		  1))

/* Compute
 *      \sum scalars[i]*points[i],