diff options
author | djm@openbsd.org <djm@openbsd.org> | 2023-06-20 02:05:09 +0200 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2023-06-20 02:07:06 +0200 |
commit | b4ac435b4e67f8eb5932d8f59eb5b3cf7dc38df0 (patch) | |
tree | 6a0aa478aeead009ffd07158faace13300b1211b /ssh-keygen.c | |
parent | upstream: Store timeouts as int, not u_int as they are limited to (diff) | |
download | openssh-b4ac435b4e67f8eb5932d8f59eb5b3cf7dc38df0.tar.xz openssh-b4ac435b4e67f8eb5932d8f59eb5b3cf7dc38df0.zip |
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
Diffstat (limited to '')
-rw-r--r-- | ssh-keygen.c | 3 |
1 files changed, 2 insertions, 1 deletions
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 <ylo@cs.hut.fi> * Copyright (c) 1994 Tatu Ylonen <ylo@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 || |