Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1N4xGR-0005LM-98 for mharc-grub-devel@gnu.org; Mon, 02 Nov 2009 08:48:07 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1N4xGO-0005KL-BI for grub-devel@gnu.org; Mon, 02 Nov 2009 08:48:04 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1N4xGJ-0005Jt-0y for grub-devel@gnu.org; Mon, 02 Nov 2009 08:48:03 -0500 Received: from [199.232.76.173] (port=51946 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1N4xGI-0005Jq-P8 for grub-devel@gnu.org; Mon, 02 Nov 2009 08:47:58 -0500 Received: from xvm-190-8.ghst.net ([217.70.190.8]:36841 helo=aybabtu.com) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1N4xGH-0003ui-Gi for grub-devel@gnu.org; Mon, 02 Nov 2009 08:47:57 -0500 Received: from [192.168.10.10] (helo=thorin) by aybabtu.com with esmtp (Exim 4.69) (envelope-from ) id 1N4xGC-0007jW-G5 for grub-devel@gnu.org; Mon, 02 Nov 2009 14:47:52 +0100 Received: from rmh by thorin with local (Exim 4.69) (envelope-from ) id 1N4xGF-00022S-7k for grub-devel@gnu.org; Mon, 02 Nov 2009 14:47:55 +0100 Date: Mon, 2 Nov 2009 14:47:55 +0100 From: Robert Millan To: The development of GRUB 2 Message-ID: <20091102134755.GB7765@thorin> References: <20091101215809.GA10489@thorin> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: Organization: free as in freedom X-Message-Flag: Worried about Outlook viruses? Switch to Thunderbird! www.mozilla.com/thunderbird X-Debbugs-No-Ack: true User-Agent: Mutt/1.5.18 (2008-05-17) X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Subject: Re: On grub_strchr implementation X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Nov 2009 13:48:05 -0000 On Mon, Nov 02, 2009 at 06:21:52AM +0530, BVK wrote: > On Mon, Nov 2, 2009 at 3:28 AM, Robert Millan wrote: > > > > But you also added a check for NULL dereference.  Is that also required by > > the standard? > > > > Standard doesn't say anything about it, so I guess it means, it is > left for implementations. Old grub_strchr implementation has this > check, so kept it as it is. I didn't want to break any code if it is > assuming this behavior. > > I just saw that other functions like, grub_strcmp, etc. don't check > for NULL dereference, so its better to remove this check. I will send > a new patch. Hi, Please see the commit I did yesterday. Does this suffice? -- Robert Millan The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and how) you may access your data; but nobody's threatening your freedom: we still allow you to remove your data and not access it at all."