Subject: Re: CVS commit: basesrc
To: Luke Mewburn <lukem@goanna.cs.rmit.edu.au>
From: Jaromir Dolecek <dolecek@ics.muni.cz>
List: source-changes
Date: 09/10/1999 08:47:11
Luke Mewburn wrote:
> Jaromir Dolecek writes:
> > Luke Mewburn wrote:
> > > check dst and src aren't null pointers before trying to use them
> > > enable strlcat/strlcpy
> > 
> > Please DO NOT check the dst and src whether they are null. Feedeing
> > NULL pointer to it is a programming error and I strongly prefer
> > sigsegving immedially than running into some other problem later.
> > Lack of NULL check in libc routines helped me many times to uncover
> > the real problem.
> 
> I beg to differ. Checking arguments before use is good practice. I've
> seen enough cases of obscure behaviour that wasn't just a simple
> `core dump' to know that helping the programmer by checking arguments
> is worth it.

Okay. Then be consistent and change all the other libc routines
to check for null.

Jaromir
-- 
Jaromir Dolecek <jdolecek@NetBSD.org>      http://www.ics.muni.cz/~dolecek/
"The only way how to get rid temptation is to yield to it." -- Oscar Wilde