[openssh-commits] [openssh] 04/04: upstream: don't screw up ssh-keygen -l output when the file
git+noreply at mindrot.org
git+noreply at mindrot.org
Thu Dec 5 01:29:12 AEDT 2024
This is an automated email from the git hooks/post-receive script.
djm pushed a commit to branch master
in repository openssh.
commit 6993d9f0959534b0b7d52e17b95e9e79fb0b3d0a
Author: djm at openbsd.org <djm at openbsd.org>
AuthorDate: Wed Dec 4 14:24:20 2024 +0000
upstream: don't screw up ssh-keygen -l output when the file
contains CR characters; GHPR236 bz3385, fix from Dmitry Belyavskiy
OpenBSD-Commit-ID: e458cf6b0adcea5b69ef4c7ba38e590841d02ef4
---
ssh-keygen.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/ssh-keygen.c b/ssh-keygen.c
index f7ea0696..89c3ed28 100644
--- a/ssh-keygen.c
+++ b/ssh-keygen.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: ssh-keygen.c,v 1.476 2024/10/18 05:37:24 djm Exp $ */
+/* $OpenBSD: ssh-keygen.c,v 1.477 2024/12/04 14:24:20 djm Exp $ */
/*
* Author: Tatu Ylonen <ylo at cs.hut.fi>
* Copyright (c) 1994 Tatu Ylonen <ylo at cs.hut.fi>, Espoo, Finland
@@ -1008,7 +1008,7 @@ do_fingerprint(struct passwd *pw)
while (getline(&line, &linesize, f) != -1) {
lnum++;
cp = line;
- cp[strcspn(cp, "\n")] = '\0';
+ cp[strcspn(cp, "\r\n")] = '\0';
/* Trim leading space and comments */
cp = line + strspn(line, " \t");
if (*cp == '#' || *cp == '\0')
--
To stop receiving notification emails like this one, please contact
djm at mindrot.org.
More information about the openssh-commits
mailing list