[Bug 1157] ssh-keygen doesn't handle DOS line breaks

bugzilla-daemon at mindrot.org bugzilla-daemon at mindrot.org
Wed Feb 15 23:00:53 EST 2006


http://bugzilla.mindrot.org/show_bug.cgi?id=1157





------- Comment #8 from dtucker at zip.com.au  2006-02-15 23:00 -------
(In reply to comment #7)
> Why not just:
> 
> if ((p = strchr(line, '\n')) != NULL)
>         *p = '\0';
> if ((p = strchr(line, '\r')) != NULL)
>         *p = '\0';

Well, for one reason, if there's no '\r' in the string, p will now be NULL, and
then when we deref it...




------- 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