Merge pull request #306 from guidovranken/oss-fuzz-26413

Call ParseBasePathHelper only after scpBasePath has been set
pull/313/head
JacobBarthelmeh 2021-01-27 19:02:29 +07:00 committed by GitHub
commit 49bac53e2f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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':