diff --git a/src/internal.c b/src/internal.c index 4df487807..d27ee8612 100644 --- a/src/internal.c +++ b/src/internal.c @@ -9266,7 +9266,7 @@ int SendKexInit(WOLFSSH* ssh) kexAlgoNamesSz = AlgoListSz(ssh->algoListKex); encAlgoNamesSz = AlgoListSz(ssh->algoListCipher); if (!keyAlgoNames) { - keyAlgoNamesSz = (word32)WSTRLEN(ssh->algoListKey); + keyAlgoNamesSz = AlgoListSz(ssh->algoListKey); } else { keyAlgoNamesSz = AlgoListSz(keyAlgoNames);