diff options
author | Damien Miller <djm@cvs.openbsd.org> | 2023-06-20 00:05:10 +0000 |
---|---|---|
committer | Damien Miller <djm@cvs.openbsd.org> | 2023-06-20 00:05:10 +0000 |
commit | 918a7202f702694e0caea66c291615255e80d495 (patch) | |
tree | b77a3e591b38598d2ff8e4457fe950c6c51ce787 /usr.bin | |
parent | a4edeb099760d29f2c691b41ff3821b2a80df697 (diff) |
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
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/ssh/ssh-keygen.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/ssh/ssh-keygen.c b/usr.bin/ssh/ssh-keygen.c index 39d3519c60f..7979930aaa1 100644 --- a/usr.bin/ssh/ssh-keygen.c +++ b/usr.bin/ssh/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 @@ -976,6 +976,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 || |