mirror of https://github.com/wolfSSL/wolfssh.git
Fixes after reviewer's comments
parent
5169432e39
commit
f128bea779
|
@ -1042,7 +1042,6 @@ static int GetScpTimestamp(WOLFSSH* ssh, byte* buf, word32 bufSz,
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifndef NO_FILESYSTEM
|
|
||||||
/* checks for if directory is being renamed in command
|
/* checks for if directory is being renamed in command
|
||||||
*
|
*
|
||||||
* returns WS_SUCCESS on success
|
* returns WS_SUCCESS on success
|
||||||
|
@ -1058,6 +1057,10 @@ static int ScpCheckForRename(WOLFSSH* ssh, int cmdSz)
|
||||||
return WS_BUFFER_E;
|
return WS_BUFFER_E;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (cmdSz + 4 > DEFAULT_SCP_MSG_SZ) {
|
||||||
|
return WS_BUFFER_E;
|
||||||
|
}
|
||||||
|
|
||||||
WSTRNCPY(buf, ssh->scpBasePath, cmdSz);
|
WSTRNCPY(buf, ssh->scpBasePath, cmdSz);
|
||||||
buf[sz] = '\0';
|
buf[sz] = '\0';
|
||||||
WSTRNCAT(buf, "/..", sizeof("/.."));
|
WSTRNCAT(buf, "/..", sizeof("/.."));
|
||||||
|
@ -1118,15 +1121,14 @@ static int ScpCheckForRename(WOLFSSH* ssh, int cmdSz)
|
||||||
return WS_SUCCESS;
|
return WS_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* helps with checking if the base path is a directory or file
|
/* helps with checking if the base path is a directory or file
|
||||||
* returns WS_SUCCESS on success */
|
* returns WS_SUCCESS on success */
|
||||||
static int ParseBasePathHelper(WOLFSSH* ssh, int cmdSz)
|
static int ParseBasePathHelper(WOLFSSH* ssh, int cmdSz)
|
||||||
{
|
{
|
||||||
int ret = 0;
|
int ret = 0;
|
||||||
#ifndef NO_FILESYSTEM
|
|
||||||
ret = ScpCheckForRename(ssh, cmdSz);
|
ret = ScpCheckForRename(ssh, cmdSz);
|
||||||
|
#ifndef NO_FILESYSTEM
|
||||||
{
|
{
|
||||||
ScpSendCtx ctx;
|
ScpSendCtx ctx;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue