mirror of https://github.com/wolfSSL/wolfssh.git
Merge pull request #304 from guidovranken/oss-fuzz-27298
Use WSTRNCMP for comparing session command stringpull/312/head
commit
e097c234fc
|
@ -540,7 +540,7 @@ int wolfSSH_accept(WOLFSSH* ssh)
|
|||
const char* cmd = wolfSSH_GetSessionCommand(ssh);
|
||||
if (cmd != NULL &&
|
||||
WOLFSSH_SESSION_SUBSYSTEM == wolfSSH_GetSessionType(ssh)
|
||||
&& (WMEMCMP(cmd, "sftp", sizeof("sftp")) == 0)) {
|
||||
&& (WSTRNCMP(cmd, "sftp", 4) == 0)) {
|
||||
ssh->acceptState = ACCEPT_INIT_SFTP;
|
||||
return wolfSSH_SFTP_accept(ssh);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue