adjust sanity check on sz before adding null terminator

pull/740/head
JacobBarthelmeh 2024-09-27 09:54:05 -06:00
parent 1dc46d5fe9
commit 76a8d8262d
1 changed files with 1 additions and 1 deletions

View File

@ -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;
}