Re: strdup(NULL) supposed to create SIGSEGV?

看板FB_hackers作者時間17年前 (2008/04/24 02:54), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串19/25 (看更多)
On Wed, 23 Apr 2008 09:06:44 -0700 (PDT) Simun Mikecin <numisemis@yahoo.com> wrote: > >If you're going to quote documents to support your ideas, it's probably > >better to read them first. > > My apologies. My fingers were faster than my mind. But this made me read it the way I should have > done in the first place. And I see that it says: > "A null pointer is returned if the new string cannot be created." > > Does that also mean that a null pointer is returned if the input is a NULL pointer (cause in that > case new string could not be created)? Are you sure? I'd say that the act of returning a NULL pointer created the not-really-a-string that was passed in. <mike -- Mike Meyer <mwm@mired.org> http://www.mired.org/consulting.html Independent Network/Unix/Perforce consultant, email for more information. _______________________________________________ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org"
文章代碼(AID): #183uNr00 (FB_hackers)
討論串 (同標題文章)
文章代碼(AID): #183uNr00 (FB_hackers)