vishalmishra434 / rpms / openssh

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