Re: strdup(NULL) supposed to create SIGSEGV?

看板FB_hackers作者時間17年前 (2008/04/23 15:22), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串3/25 (看更多)
On 2008-04-23 07:40, Garrett Cooper wrote: > I made an oops in a program, which uncovered "feature" in strdup(2) > that I wasn't aware of before. So I was wondering, is strdup(pointer = NULL) > supposed to segfault should this just return NULL and set errno? It could, in fact, tear up the fabric of the universe, or blow up your machine, if it wanted. :) _______________________________________________ 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): #183kF500 (FB_hackers)
討論串 (同標題文章)
文章代碼(AID): #183kF500 (FB_hackers)