summaryrefslogtreecommitdiff
path: root/usr.bin/ssh
diff options
context:
space:
mode:
authorDarren Tucker <dtucker@cvs.openbsd.org>2024-10-22 06:13:01 +0000
committerDarren Tucker <dtucker@cvs.openbsd.org>2024-10-22 06:13:01 +0000
commit1b2730f6c731c1884d0bda95392643755c9ad321 (patch)
treedf9c471118ad481304f75b6e253610c3f3fac3df /usr.bin/ssh
parentfae9a28ab59d14ba89f9a0a850938766ae94cc12 (diff)
Make debug call printf("%s", NULL) safe. Prevents problems on platforms
where this isn't safe (which it's not required to be). ok djm@
Diffstat (limited to 'usr.bin/ssh')
-rw-r--r--usr.bin/ssh/monitor_wrap.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.bin/ssh/monitor_wrap.c b/usr.bin/ssh/monitor_wrap.c
index a2ff0f8db44..d658a69f785 100644
--- a/usr.bin/ssh/monitor_wrap.c
+++ b/usr.bin/ssh/monitor_wrap.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: monitor_wrap.c,v 1.137 2024/10/14 01:57:50 djm Exp $ */
+/* $OpenBSD: monitor_wrap.c,v 1.138 2024/10/22 06:13:00 dtucker Exp $ */
/*
* Copyright 2002 Niels Provos <provos@citi.umich.edu>
* Copyright 2002 Markus Friedl <markus@openbsd.org>
@@ -269,7 +269,8 @@ mm_sshkey_sign(struct ssh *ssh, struct sshkey *key, u_char **sigp, size_t *lenp,
if ((r = sshbuf_get_string(m, sigp, lenp)) != 0)
fatal_fr(r, "parse");
sshbuf_free(m);
- debug3_f("%s signature len=%zu", hostkey_alg, *lenp);
+ debug3_f("%s signature len=%zu", hostkey_alg ? hostkey_alg : "(null)",
+ *lenp);
return (0);
}