Date: Tue, 10 Nov 2009 21:13:43 +0100 From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= <des@des.no> To: Alexander Best <alexbestms@wwu.de> Cc: freebsd-hackers@freebsd.org, Giorgos Keramidas <keramida@freebsd.org>, Nate Eldredge <nate@thatsmathematics.com> Subject: Re: [patch] burncd: honour for envar SPEED Message-ID: <86y6me2l54.fsf@ds4.des.no> In-Reply-To: <permail-200911101617381e86ffa80000015a-a_best01@message-id.uni-muenster.de> (Alexander Best's message of "Tue, 10 Nov 2009 17:17:38 %2B0100 (CET)") References: <permail-200911101617381e86ffa80000015a-a_best01@message-id.uni-muenster.de>
next in thread | previous in thread | raw e-mail | index | archive | help
Alexander Best <alexbestms@wwu.de> writes: > you're right. hundreds of functions cause segfaults when arg or args > are NULL. either we add safety checks for all of them (massive > overhead) or just leave them the way they are. The consensus in the C community is that adding such checks does more harm than good, because a NULL pointer is usually a symptom of a bug somewhere else in the application, and checking for a NULL pointer will either hide that bug or trigger another error somewhere down the line, possibly making the real bug harder to find, rather than easier. (next week's topic: the return value of malloc(0)...) DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86y6me2l54.fsf>