Skip to content

Commit

Permalink
upstream: don't dereference NULL pointer when hashing jumphost
Browse files Browse the repository at this point in the history
OpenBSD-Commit-ID: 251c0263e1759a921341c7efe7f1d4c73e1c70f4
  • Loading branch information
djmdjm committed Oct 12, 2023
1 parent 281c791 commit f59a94e
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions ssh.c
Original file line number Diff line number Diff line change
@@ -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@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
Expand Down Expand Up @@ -1389,15 +1389,15 @@ 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);
cinfo->homedir = xstrdup(pw->pw_dir);
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,
Expand Down

0 comments on commit f59a94e

Please sign in to comment.