Bug 1108

Summary: strdup from openbsd-compat/bsd-misc.c is broken
Product: Portable OpenSSH Reporter: Antoine Brodin <antoine.brodin>
Component: MiscellaneousAssignee: Assigned to nobody <unassigned-bugs>
Status: CLOSED FIXED    
Severity: normal    
Priority: P2    
Version: 4.2p1   
Hardware: All   
OS: Other   
URL: http://www.freebsd.org/cgi/query-pr.cgi?pr=87067

Description Antoine Brodin 2005-11-02 01:52:22 AEDT
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)
Comment 1 Darren Tucker 2005-11-02 09:09:03 AEDT
Fixed, thanks.  The only platform known to be affected is Ultrix, hence why it was not caught earlier :-)
Comment 2 Darren Tucker 2006-10-07 11:42:58 AEST
Change all RESOLVED bug to CLOSED with the exception of the ones fixed post-4.4.