From: djm@openbsd.org Date: Tue, 20 Jun 2023 00:05:09 +0000 (+0000) Subject: upstream: reset comment=NULL for each key in do_fingerprint(); X-Git-Tag: V_9_4_P1~59 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b4ac435b4e67f8eb5932d8f59eb5b3cf7dc38df0;p=thirdparty%2Fopenssh-portable.git 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 --- diff --git a/ssh-keygen.c b/ssh-keygen.c index 3a0ba8b9e..fd2725c25 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 * Copyright (c) 1994 Tatu Ylonen , 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 ||