Date: Wed, 29 Jan 1997 06:32:28 -0800 (PST) From: "Jordan K. Hubbard" <jkh> To: Thomas.Traylor@mci.com, jkh, freebsd-bugs Subject: Re: gnu/2610 Message-ID: <199701291432.GAA02586@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
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().
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199701291432.GAA02586>