]> git.ipfire.org Git - thirdparty/openssh-portable.git/commitdiff
upstream: Make debug call printf("%s", NULL) safe.
authordtucker@openbsd.org <dtucker@openbsd.org>
Tue, 22 Oct 2024 06:13:00 +0000 (06:13 +0000)
committerDarren Tucker <dtucker@dtucker.net>
Tue, 22 Oct 2024 06:50:23 +0000 (17:50 +1100)
Prevents problems on platforms where this isn't safe (which it's not
required to be).  ok djm@

OpenBSD-Commit-ID: 8fa4ce3ad90915c925b81b99a79ab920b0523387

monitor_wrap.c

index d6e488a1383fe792456d3669702d15361f03b575..bd900b2f06ecf260e96d3f89c97171921b3adc72 100644 (file)
@@ -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>
@@ -273,7 +273,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);
 }