[openssh-commits] [openssh] 02/02: upstream: reset comment=NULL for each key in do_fingerprint();

git+noreply at mindrot.org git+noreply at mindrot.org
Tue Jun 20 10:07:15 AEST 2023


This is an automated email from the git hooks/post-receive script.

djm pushed a commit to branch master
in repository openssh.

commit b4ac435b4e67f8eb5932d8f59eb5b3cf7dc38df0
Author: djm at openbsd.org <djm at openbsd.org>
Date:   Tue Jun 20 00:05:09 2023 +0000

    upstream: reset comment=NULL for each key in do_fingerprint();
    
    fixes "no comment" not showing on when running `ssh-keygen -l` on multiple
    keys where one has a comment and other following keys do not. Patch from
    Markus Kuhn via GHPR407, bz3580
    
    OpenBSD-Commit-ID: 3cce84456fdcd67dc6b84e369f92c6686d111d9b
---
 ssh-keygen.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/ssh-keygen.c b/ssh-keygen.c
index 3a0ba8b9..fd2725c2 100644
--- a/ssh-keygen.c
+++ b/ssh-keygen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-keygen.c,v 1.467 2023/04/12 08:53:54 jsg Exp $ */
+/* $OpenBSD: ssh-keygen.c,v 1.468 2023/06/20 00:05:09 djm Exp $ */
 /*
  * Author: Tatu Ylonen <ylo at cs.hut.fi>
  * Copyright (c) 1994 Tatu Ylonen <ylo at cs.hut.fi>, Espoo, Finland
@@ -997,6 +997,7 @@ do_fingerprint(struct passwd *pw)
 		 * accept a public key prefixed with a hostname or options.
 		 * Try a bare key first, otherwise skip the leading stuff.
 		 */
+		comment = NULL;
 		if ((public = try_read_key(&cp)) == NULL) {
 			i = strtol(cp, &ep, 10);
 			if (i == 0 || ep == NULL ||

-- 
To stop receiving notification emails like this one, please contact
djm at mindrot.org.


More information about the openssh-commits mailing list