From f018455f435f2dd76bd831143b8c9846774ab04e Mon Sep 17 00:00:00 2001 From: JacobBarthelmeh Date: Mon, 7 Aug 2023 08:25:08 -0700 Subject: [PATCH] Use already defined max 32bit size --- src/internal.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/internal.c b/src/internal.c index 1141003d8..3d191d4a5 100644 --- a/src/internal.c +++ b/src/internal.c @@ -13217,16 +13217,12 @@ int wolfSSH_oct2dec(WOLFSSH* ssh, byte* oct, word32 octSz) } -/* not using UINT_MAX here because word32 should always be 32 bits where an - * int type can change depending on platform */ -#define WS_WORD32_MAX_SZ 4294967295U - /* addend1 += addend2 */ void AddAssign64(word32* addend1, word32 addend2) { - if (addend1[0] > (WS_WORD32_MAX_SZ - addend2)) { + if (addend1[0] > (WOLFSSL_MAX_32BIT - addend2)) { addend1[1]++; - addend1[0] = addend2 - (WS_WORD32_MAX_SZ - addend1[0]); + addend1[0] = addend2 - (WOLFSSL_MAX_32BIT- addend1[0]); } else { addend1[0] += addend2;