summaryrefslogtreecommitdiff
path: root/sshconnect2.c
diff options
context:
space:
mode:
authordjm@openbsd.org <djm@openbsd.org>2017-01-30 00:32:03 +0000
committerDamien Miller <djm@mindrot.org>2017-01-30 12:04:10 +1100
commit3e032a95e46bfaea9f9e857678ac8fa5f63997fb (patch)
tree05baf4989c917ff7815a1efc349cdff9a3d00d66 /sshconnect2.c
parent01cfaa2b1cfb84f3cdd32d1bf82b120a8d30e057 (diff)
upstream commit
don't dereference authctxt before testing != NULL, it causes compilers to make assumptions; from Karsten Weiss Upstream-ID: 794243aad1e976ebc717885b7a97a25e00c031b2
Diffstat (limited to 'sshconnect2.c')
-rw-r--r--sshconnect2.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sshconnect2.c b/sshconnect2.c
index 103a2b36a..badc000ce 100644
--- a/sshconnect2.c
+++ b/sshconnect2.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: sshconnect2.c,v 1.251 2016/12/04 23:54:02 djm Exp $ */ 1/* $OpenBSD: sshconnect2.c,v 1.252 2017/01/30 00:32:03 djm Exp $ */
2/* 2/*
3 * Copyright (c) 2000 Markus Friedl. All rights reserved. 3 * Copyright (c) 2000 Markus Friedl. All rights reserved.
4 * Copyright (c) 2008 Damien Miller. All rights reserved. 4 * Copyright (c) 2008 Damien Miller. All rights reserved.
@@ -934,14 +934,14 @@ input_userauth_passwd_changereq(int type, u_int32_t seqnr, void *ctxt)
934 Authctxt *authctxt = ctxt; 934 Authctxt *authctxt = ctxt;
935 char *info, *lang, *password = NULL, *retype = NULL; 935 char *info, *lang, *password = NULL, *retype = NULL;
936 char prompt[150]; 936 char prompt[150];
937 const char *host = options.host_key_alias ? options.host_key_alias : 937 const char *host;
938 authctxt->host;
939 938
940 debug2("input_userauth_passwd_changereq"); 939 debug2("input_userauth_passwd_changereq");
941 940
942 if (authctxt == NULL) 941 if (authctxt == NULL)
943 fatal("input_userauth_passwd_changereq: " 942 fatal("input_userauth_passwd_changereq: "
944 "no authentication context"); 943 "no authentication context");
944 host = options.host_key_alias ? options.host_key_alias : authctxt->host;
945 945
946 info = packet_get_string(NULL); 946 info = packet_get_string(NULL);
947 lang = packet_get_string(NULL); 947 lang = packet_get_string(NULL);