aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJouni Malinen <j@w1.fi>2019-06-22 15:42:53 (GMT)
committerJouni Malinen <j@w1.fi>2019-06-22 15:56:44 (GMT)
commite1e203c8005f4807992df87a79dde01e8c11c8b8 (patch)
tree561a87a080fe514722613d4d8c4abdb453e777a5
parent702cc6da1a423accaf9282d59832045f72880d03 (diff)
downloadhostap-e1e203c8005f4807992df87a79dde01e8c11c8b8.zip
hostap-e1e203c8005f4807992df87a79dde01e8c11c8b8.tar.gz
hostap-e1e203c8005f4807992df87a79dde01e8c11c8b8.tar.bz2
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>
-rw-r--r--src/tls/libtommath.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/tls/libtommath.c b/src/tls/libtommath.c
index 4f7a148..7156744 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;