Date: Fri, 6 Oct 1995 22:29:46 -0400 From: Thomas David Rivers <ponds!rivers@dg-rtp.dg.com> To: dca.net!awhite@dg-rtp.dg.com, se@ZPR.Uni-Koeln.DE Cc: bugs@freebsd.org Subject: Re: bug with gcc 2.6.2? Message-ID: <199510070229.WAA24461@lakes>
next in thread | raw e-mail | index | archive | help
> > Thanks for your response. Of course you are right, a null string and a > null pointer are not the same. > > However, it would be nice if the str* functions would not SIGSEV when > called with a null pointer, but rather failed more nicely. > > -aw > If the str* functions were not called so much, I'd agree. However, since they are so frequently used, I lean toward not adding the check for the NULL pointer, as it would burden most programs unnecessarilly. As evidenced by the large number of programs that do not pass NULL (and then sigsegv) to a str* program, this situation is rare... I would think a "special/debugging" C library that did this, with which a developer could build that checked this, and many other things (such as the arguments to fopen(), use of gets(), etc...) would be something worthwhile. - Dave Rivers -
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199510070229.WAA24461>