[openssh-commits] [openssh] 02/02: upstream: Prevent theoretical NULL deref in throughlocal_sftp.

git+noreply at mindrot.org git+noreply at mindrot.org
Wed Mar 19 17:41:58 AEDT 2025


This is an automated email from the git hooks/post-receive script.

dtucker pushed a commit to branch master
in repository openssh.

commit 1b311b6b17be81577514c38e8be4f5740d7df496
Author: dtucker at openbsd.org <dtucker at openbsd.org>
AuthorDate: Wed Mar 19 06:11:15 2025 +0000

    upstream: Prevent theoretical NULL deref in throughlocal_sftp.
    
    Coverity CID 405019, although at the moment it's not reachable. ok djm@
    
    OpenBSD-Commit-ID: 630d46c1021b69fbb470e349976c70e9a48b7644
---
 scp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scp.c b/scp.c
index 0779c3c2..d12cf6df 100644
--- a/scp.c
+++ b/scp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: scp.c,v 1.261 2024/06/26 23:14:14 deraadt Exp $ */
+/* $OpenBSD: scp.c,v 1.262 2025/03/19 06:11:15 dtucker Exp $ */
 /*
  * scp - secure remote copy.  This is basically patched BSD rcp which
  * uses ssh to do the data transfer (instead of using rcmd).
@@ -1085,7 +1085,7 @@ toremote(int argc, char **argv, enum scp_mode_e mode, char *sftp_direct)
 		}
 		if (host && throughlocal) {	/* extended remote to remote */
 			if (mode == MODE_SFTP) {
-				if (remin == -1) {
+				if (remin == -1 || conn == NULL) {
 					/* Connect to dest now */
 					conn = do_sftp_connect(thost, tuser,
 					    tport, sftp_direct,

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list