Skip to content

Commit 58dd2df

Browse files
committed
Fix not to assign null to strstr function
1 parent da0b80c commit 58dd2df

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

contrib/win32/win32compat/w32-doexec.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -469,7 +469,7 @@ int do_exec_windows(struct ssh *ssh, Session *s, const char *command, int pty) {
469469
}
470470

471471
//Passing the PRIVSEP_LOG_FD (STDERR_FILENO + 2) to sftp-server for logging
472-
if (command) {
472+
if (exec_command) {
473473
if (strstr(exec_command, "sftp-server.exe")) {
474474
if (posix_spawn_file_actions_adddup2(&actions, STDERR_FILENO + 2, SFTP_SERVER_LOG_FD) != 0) {
475475
errno = EOTHER;

0 commit comments

Comments
 (0)