summaryrefslogtreecommitdiffstats
path: root/usr.bin/ssh/sshconnect2.c
diff options
context:
space:
mode:
authordjm <djm@openbsd.org>2017-01-30 00:32:03 +0000
committerdjm <djm@openbsd.org>2017-01-30 00:32:03 +0000
commit9a339890d058f51f95bfe112984b0da5cd555392 (patch)
treea78709c12113ddcc194fd828695a581f246f5b0c /usr.bin/ssh/sshconnect2.c
parentSeriously warn against calling BN_init(3), BN_MONT_CTX_init(3), (diff)
downloadwireguard-openbsd-9a339890d058f51f95bfe112984b0da5cd555392.tar.xz
wireguard-openbsd-9a339890d058f51f95bfe112984b0da5cd555392.zip
don't dereference authctxt before testing != NULL, it causes compilers
to make assumptions; from Karsten Weiss
Diffstat (limited to 'usr.bin/ssh/sshconnect2.c')
-rw-r--r--usr.bin/ssh/sshconnect2.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/ssh/sshconnect2.c b/usr.bin/ssh/sshconnect2.c
index 80bf47e139f..39b21a7e5b9 100644
--- a/usr.bin/ssh/sshconnect2.c
+++ b/usr.bin/ssh/sshconnect2.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: sshconnect2.c,v 1.251 2016/12/04 23:54:02 djm Exp $ */
+/* $OpenBSD: sshconnect2.c,v 1.252 2017/01/30 00:32:03 djm Exp $ */
/*
* Copyright (c) 2000 Markus Friedl. All rights reserved.
* Copyright (c) 2008 Damien Miller. All rights reserved.
@@ -926,14 +926,14 @@ input_userauth_passwd_changereq(int type, u_int32_t seqnr, void *ctxt)
Authctxt *authctxt = ctxt;
char *info, *lang, *password = NULL, *retype = NULL;
char prompt[150];
- const char *host = options.host_key_alias ? options.host_key_alias :
- authctxt->host;
+ const char *host;
debug2("input_userauth_passwd_changereq");
if (authctxt == NULL)
fatal("input_userauth_passwd_changereq: "
"no authentication context");
+ host = options.host_key_alias ? options.host_key_alias : authctxt->host;
info = packet_get_string(NULL);
lang = packet_get_string(NULL);