From 9e5adc069719e8909d4a20f35aad60ffcf358aeb Mon Sep 17 00:00:00 2001 From: Chris Conlon Date: Thu, 17 Oct 2019 15:56:36 -0600 Subject: [PATCH] fix loop bound in wolfSSH_oct2dec --- src/internal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/internal.c b/src/internal.c index dd48914b..a2eacbb0 100644 --- a/src/internal.c +++ b/src/internal.c @@ -8707,7 +8707,7 @@ int wolfSSH_oct2dec(WOLFSSH* ssh, byte* oct, word32 octSz) /* convert octal string to int without mp_read_radix() */ ret = 0; - for (i = 0; i < WOLFSSH_MAX_OCTET_LEN; i++) + for (i = 0; i < octSz; i++) { if (oct[i] < '0' || oct[0] > '7') { ret = WS_BAD_ARGUMENT;