]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream: Prevent possible null pointer deref of ip_str in debug.
authordtucker@openbsd.org <dtucker@openbsd.org>
Sun, 2 Feb 2020 09:22:22 +0000 (09:22 +0000)
committerDarren Tucker <dtucker@dtucker.net>
Sun, 2 Feb 2020 09:31:48 +0000 (20:31 +1100)
OpenBSD-Commit-ID: 37b252e2e6f690efed6682437ef75734dbc8addf

clientloop.c

index 2590962b1ac84fbca961baafd144537530d2f38b..c5b7f19cde84233026b1d3d234a91e962fdd1e24 100644 (file)
@@ -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
@@ -2187,7 +2187,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) {