diff options
author | dtucker@openbsd.org <dtucker@openbsd.org> | 2020-02-02 09:22:22 +0000 |
---|---|---|
committer | Darren Tucker <dtucker@dtucker.net> | 2020-02-02 20:31:48 +1100 |
commit | 58c819096a2167983e55ae686486ce317b69b2d1 (patch) | |
tree | 7ffccb7817d7ca7887ed1c258969d23a5fb3353e /clientloop.c | |
parent | 0facae7bc8d3f8f9d02d0f6bed3d163ff7f39806 (diff) |
upstream: Prevent possible null pointer deref of ip_str in debug.
OpenBSD-Commit-ID: 37b252e2e6f690efed6682437ef75734dbc8addf
Diffstat (limited to 'clientloop.c')
-rw-r--r-- | clientloop.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/clientloop.c b/clientloop.c index 2590962b1..c5b7f19cd 100644 --- a/clientloop.c +++ b/clientloop.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: clientloop.c,v 1.338 2020/01/30 07:20:57 djm Exp $ */ | 1 | /* $OpenBSD: clientloop.c,v 1.339 2020/02/02 09:22:22 dtucker Exp $ */ |
2 | /* | 2 | /* |
3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> | 3 | * Author: Tatu Ylonen <ylo@cs.hut.fi> |
4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland | 4 | * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland |
@@ -2187,7 +2187,8 @@ client_input_hostkeys(struct ssh *ssh) | |||
2187 | /* Find which keys we already know about. */ | 2187 | /* Find which keys we already know about. */ |
2188 | for (i = 0; i < options.num_user_hostfiles; i++) { | 2188 | for (i = 0; i < options.num_user_hostfiles; i++) { |
2189 | debug("%s: searching %s for %s / %s", __func__, | 2189 | debug("%s: searching %s for %s / %s", __func__, |
2190 | options.user_hostfiles[i], ctx->host_str, ctx->ip_str); | 2190 | options.user_hostfiles[i], ctx->host_str, |
2191 | ctx->ip_str ? ctx->ip_str : "(null)"); | ||
2191 | if ((r = hostkeys_foreach(options.user_hostfiles[i], | 2192 | if ((r = hostkeys_foreach(options.user_hostfiles[i], |
2192 | hostkeys_find, ctx, ctx->host_str, ctx->ip_str, | 2193 | hostkeys_find, ctx, ctx->host_str, ctx->ip_str, |
2193 | HKF_WANT_PARSE_KEY|HKF_WANT_MATCH)) != 0) { | 2194 | HKF_WANT_PARSE_KEY|HKF_WANT_MATCH)) != 0) { |