[Bug 1157] ssh-keygen doesn't handle DOS line breaks
    bugzilla-daemon at mindrot.org 
    bugzilla-daemon at mindrot.org
       
    Wed Feb 15 22:50:22 EST 2006
    
    
  
http://bugzilla.mindrot.org/show_bug.cgi?id=1157
------- Comment #7 from djm at mindrot.org  2006-02-15 22:50 -------
(From update of attachment 1069)
> 	while (fgets(line, sizeof(line), fp)) {
>-		if (!(p = strchr(line, '\n'))) {
>+		p = strchr(line, '\n');
>+		q = strchr(line, '\r');
Why not just:
if ((p = strchr(line, '\n')) != NULL)
        *p = '\0';
if ((p = strchr(line, '\r')) != NULL)
        *p = '\0';
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
    
    
More information about the openssh-bugs
mailing list