From owner-freebsd-hackers@FreeBSD.ORG Tue Nov 10 20:24:30 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3825B106568F for ; Tue, 10 Nov 2009 20:24:30 +0000 (UTC) (envelope-from pluknet@gmail.com) Received: from mail-bw0-f213.google.com (mail-bw0-f213.google.com [209.85.218.213]) by mx1.freebsd.org (Postfix) with ESMTP id 93CD68FC0C for ; Tue, 10 Nov 2009 20:24:29 +0000 (UTC) Received: by bwz5 with SMTP id 5so447154bwz.3 for ; Tue, 10 Nov 2009 12:24:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=zPcbj3JASpUtajP78zw3wyFAnVn2nlPniK8hmR0vN28=; b=GZtgrUk4AMxaIOkpetWZNot9AuhxyEIXi3v+t2oKCCDZzMvvugI31UpYg4ShRstFzA OEdbmUVhUscyObIoKhV1Atpqktj9Ap5swOj4MsAAEtsRXynsiYhKBJlsolPT7DzJgT0c QkqC/HcgfgWvbHq2RscTV0gWtORhMlkMdzVQQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=eMs4IF2wqPNq1Heit80L2yb4Ch+KrB2URhtUPzwqC+h8ezBLZksL8f8vIeTQKgdv+8 Gppf/WXLtbXWbqnluhUSvxUrtxN8z6QLkU2YYh/zARb6rR/tWPRMYshCoUcOgUi2VNLw 43Pq/caz80++WjZgtsArTfmSLGCbVDX7s2YAw= MIME-Version: 1.0 Received: by 10.204.25.207 with SMTP id a15mr597868bkc.8.1257884668524; Tue, 10 Nov 2009 12:24:28 -0800 (PST) In-Reply-To: <86y6me2l54.fsf@ds4.des.no> References: <86y6me2l54.fsf@ds4.des.no> Date: Tue, 10 Nov 2009 23:24:28 +0300 Message-ID: From: pluknet To: =?ISO-8859-1?Q?Dag=2DErling_Sm=F8rgrav?= Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Alexander Best , Giorgos Keramidas , Nate Eldredge , freebsd-hackers@freebsd.org Subject: Re: [patch] burncd: honour for envar SPEED X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 10 Nov 2009 20:24:30 -0000 2009/11/10 Dag-Erling Sm=F8rgrav : > Alexander Best writes: >> you're right. hundreds of functions cause segfaults when arg or args >> are NULL. =A0either 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. > And which is a way some well known OS' developers like to choose to fix sec.holes. No cookie. P.S. I apologize for flaming on this. > (next week's topic: the return value of malloc(0)...) > > DES > -- > Dag-Erling Sm=F8rgrav - des@des.no --=20 wbr, pluknet