Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 29 Jan 1997 01:30:02 -0800 (PST)
From:      j@uriah.heep.sax.de (J Wunsch)
To:        freebsd-bugs
Subject:   Re: gnu/2610: strdup will cause you app to core if passed a NULL string
Message-ID:  <199701290930.BAA21492@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR gnu/2610; it has been noted by GNATS.

From: j@uriah.heep.sax.de (J Wunsch)
To: Thomas.Traylor@mci.com
Cc: FreeBSD-gnats-submit@FreeBSD.ORG
Subject: Re: gnu/2610: strdup will cause you app to core if passed a NULL string
Date: Wed, 29 Jan 1997 10:05:36 +0100

 As Thomas S Traylor wrote:
 
 > >Number:         2610
 > >Category:       gnu
 
 Well, `gnu' is the wrong category, but nevermind.
 
 > 	The library function strdup does not handle a NULL string being
 > 	passed to it. When you do the application cores.
 
 Then don't do it.  It's not supposed to `duplicate' a NULL pointer, i
 think.  What would you exect from it?  Another NULL pointer?  How do
 you distinguish it from ``Out of memory''?
 
 Neither of the strxxx() functions accept NULL pointers, so i won't see
 a reason for strdup().
 
 -- 
 cheers, J"org
 
 joerg_wunsch@uriah.heep.sax.de -- http://www.sax.de/~joerg/ -- NIC: JW11-RIPE
 Never trust an operating system you don't have sources for. ;-)



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199701290930.BAA21492>