From cd9ef04815f85557df7868f63a26498fd87ab72d Mon Sep 17 00:00:00 2001 From: Guido Vranken Date: Fri, 8 Jan 2021 11:31:48 +0100 Subject: [PATCH] Call ParseBasePathHelper only after scpBasePath has been set --- src/wolfscp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/wolfscp.c b/src/wolfscp.c index 9f29242..ea85492 100644 --- a/src/wolfscp.c +++ b/src/wolfscp.c @@ -1219,10 +1219,10 @@ int ParseScpCommand(WOLFSSH* ssh) #else ssh->scpBasePath = cmd + idx; #endif + ret = ParseBasePathHelper(ssh, cmdSz); + if (wolfSSH_CleanPath(ssh, (char*)ssh->scpBasePath) < 0) + ret = WS_FATAL_ERROR; } - ret = ParseBasePathHelper(ssh, cmdSz); - if (wolfSSH_CleanPath(ssh, (char*)ssh->scpBasePath) < 0) - ret = WS_FATAL_ERROR; break; case 'f':