[openssh-commits] [openssh] 01/01: upstream: don't dereference NULL pointer when hashing jumphost

git+noreply at mindrot.org git+noreply at mindrot.org
Thu Oct 12 13:58:52 AEDT 2023


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

djm pushed a commit to branch master
in repository openssh.

commit f59a94e22e46db2c23eddeb871aa9e8d93ab0016
Author: djm at openbsd.org <djm at openbsd.org>
Date:   Thu Oct 12 02:48:43 2023 +0000

    upstream: don't dereference NULL pointer when hashing jumphost
    
    OpenBSD-Commit-ID: 251c0263e1759a921341c7efe7f1d4c73e1c70f4
---
 ssh.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/ssh.c b/ssh.c
index 17a26c5f..35c48e62 100644
--- a/ssh.c
+++ b/ssh.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh.c,v 1.597 2023/10/12 02:18:18 djm Exp $ */
+/* $OpenBSD: ssh.c,v 1.598 2023/10/12 02:48:43 djm Exp $ */
 /*
  * Author: Tatu Ylonen <ylo at cs.hut.fi>
  * Copyright (c) 1995 Tatu Ylonen <ylo at cs.hut.fi>, Espoo, Finland
@@ -1389,8 +1389,6 @@ main(int ac, char **av)
 	    (unsigned long long)pw->pw_uid);
 	cinfo->keyalias = xstrdup(options.host_key_alias ?
 	    options.host_key_alias : options.host_arg);
-	cinfo->conn_hash_hex = ssh_connection_hash(cinfo->thishost, host,
-	    cinfo->portstr, options.user, options.jump_host);
 	cinfo->host_arg = xstrdup(options.host_arg);
 	cinfo->remhost = xstrdup(host);
 	cinfo->remuser = xstrdup(options.user);
@@ -1398,6 +1396,8 @@ main(int ac, char **av)
 	cinfo->locuser = xstrdup(pw->pw_name);
 	cinfo->jmphost = xstrdup(options.jump_host == NULL ?
 	    "" : options.jump_host);
+	cinfo->conn_hash_hex = ssh_connection_hash(cinfo->thishost,
+	    cinfo->remhost, cinfo->portstr, cinfo->remuser, cinfo->jmphost);
 
 	/*
 	 * Expand tokens in arguments. NB. LocalCommand is expanded later,

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


More information about the openssh-commits mailing list