From b95d43fd1ce293cec5890d965b636e5f753e9fb0 Mon Sep 17 00:00:00 2001 From: Daniele Lacamera Date: Wed, 17 Feb 2021 07:19:46 +0100 Subject: [PATCH] Reverted strtol to atoi --- src/wolfscp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wolfscp.c b/src/wolfscp.c index 88171e8..2785395 100644 --- a/src/wolfscp.c +++ b/src/wolfscp.c @@ -894,7 +894,7 @@ static int GetScpFileSize(WOLFSSH* ssh, byte* buf, word32 bufSz, if (ret == WS_SUCCESS) { /* replace space with newline for atoi */ buf[spaceIdx] = '\n'; - ssh->scpFileSz = strtol((char *)(buf + idx), NULL, 10); + ssh->scpFileSz = atoi((char *)(buf + idx)); /* restore space, increment idx to space */ buf[spaceIdx] = ' '; @@ -1000,7 +1000,7 @@ static int GetScpTimestamp(WOLFSSH* ssh, byte* buf, word32 bufSz, if (ret == WS_SUCCESS) { /* replace space with newline for atoi */ buf[spaceIdx] = '\n'; - ssh->scpMTime = strtol((char*)(buf + idx), NULL, 10); + ssh->scpMTime = atoi((char*)(buf + idx)); /* restore space, increment idx past it */ buf[spaceIdx] = ' '; @@ -1032,7 +1032,7 @@ static int GetScpTimestamp(WOLFSSH* ssh, byte* buf, word32 bufSz, if (ret == WS_SUCCESS) { /* replace space with newline for atoi */ buf[spaceIdx] = '\n'; - ssh->scpATime = strtol((char*)(buf + idx), NULL, 10); + ssh->scpATime = atoi((char*)(buf + idx)); /* restore space, increment idx past it */ buf[spaceIdx] = ' ';