kentpeacock / rpms / openssh

Forked from rpms/openssh 2 years ago
Clone
Dmitry Belyavskiy 9dff9c
diff -up openssh-8.0p1/ssh-keygen.c.strip-doseol openssh-8.0p1/ssh-keygen.c
Dmitry Belyavskiy 9dff9c
--- openssh-8.0p1/ssh-keygen.c.strip-doseol	2021-03-18 17:41:34.472404994 +0100
Dmitry Belyavskiy 9dff9c
+++ openssh-8.0p1/ssh-keygen.c	2021-03-18 17:41:55.255538761 +0100
Dmitry Belyavskiy 9dff9c
@@ -901,7 +901,7 @@ do_fingerprint(struct passwd *pw)
Dmitry Belyavskiy 9dff9c
 	while (getline(&line, &linesize, f) != -1) {
Dmitry Belyavskiy 9dff9c
 		lnum++;
Dmitry Belyavskiy 9dff9c
 		cp = line;
Dmitry Belyavskiy 9dff9c
-		cp[strcspn(cp, "\n")] = '\0';
Dmitry Belyavskiy 9dff9c
+		cp[strcspn(cp, "\r\n")] = '\0';
Dmitry Belyavskiy 9dff9c
 		/* Trim leading space and comments */
Dmitry Belyavskiy 9dff9c
 		cp = line + strspn(line, " \t");
Dmitry Belyavskiy 9dff9c
 		if (*cp == '#' || *cp == '\0')