From 4f8c2b971fe966cb06c2cd30090f33ae6cab0508 Mon Sep 17 00:00:00 2001 From: John Safranek Date: Sat, 17 Oct 2020 19:07:44 -0700 Subject: [PATCH] Move the binSz check variable to a spot where it is only declared in the same condition it is used and initialize it to zero. --- wolfcrypt/src/dh.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wolfcrypt/src/dh.c b/wolfcrypt/src/dh.c index efabd4edf..af281feb2 100644 --- a/wolfcrypt/src/dh.c +++ b/wolfcrypt/src/dh.c @@ -1237,6 +1237,7 @@ static int GeneratePublicDh(DhKey* key, byte* priv, word32 privSz, { int ret = 0; #ifndef WOLFSSL_SP_MATH + word32 binSz = 0; #ifdef WOLFSSL_SMALL_STACK mp_int* x; mp_int* y; @@ -1245,7 +1246,6 @@ static int GeneratePublicDh(DhKey* key, byte* priv, word32 privSz, mp_int y[1]; #endif #endif - word32 binSz; #ifdef WOLFSSL_HAVE_SP_DH #ifndef WOLFSSL_SP_NO_2048