jonathancammack / rpms / openssh

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