fix loop bound in wolfSSH_oct2dec

pull/204/head
Chris Conlon 2019-10-17 15:56:36 -06:00
parent f0c93bdd08
commit 9e5adc0697
1 changed files with 1 additions and 1 deletions

View File

@ -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;