From owner-freebsd-bugs Wed Jan 29 06:32:33 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id GAA02605 for bugs-outgoing; Wed, 29 Jan 1997 06:32:33 -0800 (PST) Received: (from jkh@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id GAA02586; Wed, 29 Jan 1997 06:32:28 -0800 (PST) Date: Wed, 29 Jan 1997 06:32:28 -0800 (PST) From: "Jordan K. Hubbard" Message-Id: <199701291432.GAA02586@freefall.freebsd.org> To: Thomas.Traylor@mci.com, jkh, freebsd-bugs Subject: Re: gnu/2610 Sender: owner-bugs@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk Synopsis: strdup will cause you app to core if passed a NULL string State-Changed-From-To: open-closed State-Changed-By: jkh State-Changed-When: Wed Jan 29 06:29:31 PST 1997 State-Changed-Why: I don't believe that strdup() is supposed to do anything else when receiving a NULL argument, and returning NULL would cause the error to be indistinguishable from "out of memory", which is what anyone checking the return value of strdup() is going to flag in their failure case. Just as with other routines like strcpy() core when getting NULL (and their behavior is mandated by the ISO 9899 spec), so should I believe strdup().