Call ParseBasePathHelper only after scpBasePath has been set

pull/306/head
Guido Vranken 2021-01-08 11:31:48 +01:00
parent 707312065b
commit cd9ef04815
1 changed files with 3 additions and 3 deletions

View File

@ -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':