[Bug 1108] strdup from openbsd-compat/bsd-misc.c is broken

bugzilla-daemon at mindrot.org bugzilla-daemon at mindrot.org
Wed Nov 2 01:52:24 EST 2005


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

           Summary: strdup from openbsd-compat/bsd-misc.c is broken
           Product: Portable OpenSSH
           Version: 4.2p1
          Platform: All
               URL: http://www.freebsd.org/cgi/query-pr.cgi?pr=87067
        OS/Version: other
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Miscellaneous
        AssignedTo: bitbucket at mindrot.org
        ReportedBy: antoine.brodin at laposte.net


This bug has been reported to FreeBSD but the submitter didn't report it to
OpenSSH : http://www.freebsd.org/cgi/query-pr.cgi?pr=87067

The check if (strlcpy(cp, str, len) != len) is bogus because strlcpy will
return strlen(str) i.e. len-1 so strdup will always return NULL.

This affects OS that don't have strdup (I don't know who they are)




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