libtommath: Make sure fast_s_mp_mul_digs initializes the W[] array

Some compilers have started to warn about this and the use of two loops
with ix 0..pa-1 and 0..pa loop a bit suspicious, so better make sure the
array is initialized with zeros before extracting the terms from it.

Signed-off-by: Jouni Malinen <j@w1.fi>
master
Jouni Malinen 5 years ago
parent 702cc6da1a
commit e1e203c800

@ -2441,6 +2441,7 @@ static int fast_s_mp_mul_digs (mp_int * a, mp_int * b, mp_int * c, int digs)
/* clear the carry */
_W = 0;
os_memset(W, 0, sizeof(W));
for (ix = 0; ix < pa; ix++) {
int tx, ty;
int iy;

Loading…
Cancel
Save