summaryrefslogtreecommitdiff
path: root/usr.bin/ssh/clientloop.c
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@cvs.openbsd.org>2020-02-02 09:22:23 +0000
committerDarren Tucker <dtucker@cvs.openbsd.org>2020-02-02 09:22:23 +0000
commitd6a8b964eda3029bba4e761de723816b74676fa9 (patch)
tree15320a13778cac5dda11a866a92562f309e48dea /usr.bin/ssh/clientloop.c
parentcbd1bcdd36e9bb5c828144a7c4fc7b8c0a01ff51 (diff)
Prevent possible null pointer deref of ip_str in debug.
Diffstat (limited to 'usr.bin/ssh/clientloop.c')
-rw-r--r--usr.bin/ssh/clientloop.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/ssh/clientloop.c b/usr.bin/ssh/clientloop.c
index f7ce3a2c2a2..f1b9a5eb90d 100644
--- a/usr.bin/ssh/clientloop.c
+++ b/usr.bin/ssh/clientloop.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: clientloop.c,v 1.338 2020/01/30 07:20:57 djm Exp $ */
+/* $OpenBSD: clientloop.c,v 1.339 2020/02/02 09:22:22 dtucker Exp $ */
/*
* Author: Tatu Ylonen <ylo@cs.hut.fi>
* Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
@@ -2173,7 +2173,8 @@ client_input_hostkeys(struct ssh *ssh)
/* Find which keys we already know about. */
for (i = 0; i < options.num_user_hostfiles; i++) {
debug("%s: searching %s for %s / %s", __func__,
- options.user_hostfiles[i], ctx->host_str, ctx->ip_str);
+ options.user_hostfiles[i], ctx->host_str,
+ ctx->ip_str ? ctx->ip_str : "(null)");
if ((r = hostkeys_foreach(options.user_hostfiles[i],
hostkeys_find, ctx, ctx->host_str, ctx->ip_str,
HKF_WANT_PARSE_KEY|HKF_WANT_MATCH)) != 0) {