mirror of https://github.com/wolfSSL/wolfssh.git
adjust sanity check on sz before adding null terminator
parent
1dc46d5fe9
commit
76a8d8262d
|
@ -1089,7 +1089,7 @@ static int ScpCheckForRename(WOLFSSH* ssh, int cmdSz)
|
|||
int sz = (int)WSTRLEN(ssh->scpBasePath);
|
||||
int idx;
|
||||
|
||||
if (sz > (int)sizeof(buf)) {
|
||||
if (sz >= DEFAULT_SCP_MSG_SZ) {
|
||||
return WS_BUFFER_E;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue