From: Jouni Malinen Date: Sat, 22 Jun 2019 15:42:53 +0000 (+0300) Subject: libtommath: Make sure fast_s_mp_mul_digs initializes the W[] array X-Git-Tag: hostap_2_9~141 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e1e203c8005f4807992df87a79dde01e8c11c8b8;p=thirdparty%2Fhostap.git 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 --- diff --git a/src/tls/libtommath.c b/src/tls/libtommath.c index 4f7a14823..715674424 100644 --- a/src/tls/libtommath.c +++ b/src/tls/libtommath.c @@ -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;