Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1CsLtB-0008GL-RJ for mharc-grub-devel@gnu.org; Sat, 22 Jan 2005 09:05:21 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1CsLt9-0008EC-P7 for grub-devel@gnu.org; Sat, 22 Jan 2005 09:05:19 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1CsLt5-0008DC-H8 for grub-devel@gnu.org; Sat, 22 Jan 2005 09:05:16 -0500 Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1CsLt5-0008Al-CN for grub-devel@gnu.org; Sat, 22 Jan 2005 09:05:15 -0500 Received: from [145.74.66.11] (helo=mail-cn.han.nl) by monty-python.gnu.org with esmtp (Exim 4.34) id 1CsLfQ-000356-TB for grub-devel@gnu.org; Sat, 22 Jan 2005 08:51:09 -0500 Received: from vscan-cn.han.nl (venus.han.nl [145.74.65.6]) by mail-cn.han.nl (Postfix) with ESMTP id 6D02C960F for ; Sat, 22 Jan 2005 14:46:50 +0100 (CET) Received: from mail-cn.han.nl ([145.74.66.11]) by vscan-cn.han.nl (venus.han.nl [145.74.65.6]) (amavisd-new, port 10024) with ESMTP id 12251-06 for ; Sat, 22 Jan 2005 14:46:49 +0100 (CET) Received: from mail1.han.nl (mail1.han.nl [145.74.103.11]) by mail-cn.han.nl (Postfix) with ESMTP id 5B78E9D18 for ; Sat, 22 Jan 2005 14:46:49 +0100 (CET) Received: from marco.marco-g.com (mgerards.xs4all.nl [82.92.27.129]) by mail1.han.nl (Postfix) with ESMTP id 14588C04C for ; Sat, 22 Jan 2005 14:46:49 +0100 (CET) Mail-Copies-To: metgerards@student.han.nl To: The development of GRUB 2 References: <20050108234820.GA7198@miracle> <87acr2fscr.fsf@marco.marco-g.com> From: Marco Gerards Date: Sat, 22 Jan 2005 13:46:37 +0000 In-Reply-To: (Hollis Blanchard's message of "Fri, 21 Jan 2005 23:38:11 -0600") Message-ID: <87brbh7f0i.fsf@marco.marco-g.com> User-Agent: Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new (2.2.0) at vscan-cn.han.nl Subject: Re: strndup broken 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: Sat, 22 Jan 2005 14:05:20 -0000 Hollis Blanchard writes: >> Can you check if it works for you? If I don't hear anything I will >> commit it next week or so. > > This exposed a stupid bug I introduced months ago: > > --- disk/powerpc/ieee1275/ofdisk.c 27 Dec 2004 13:46:20 -0000 > 1.6 > +++ disk/powerpc/ieee1275/ofdisk.c 22 Jan 2005 05:37:16 -0000 > @@ -50,12 +50,12 @@ grub_ofdisk_open (const char *name, grub > { > grub_ieee1275_phandle_t dev; > grub_ieee1275_ihandle_t dev_ihandle = 0; > - char *devpath = 0; > + char *devpath; > /* XXX: This should be large enough for any possible case. */ > char prop[64]; > int actual; > > - devpath = grub_strndup (name, grub_strlen (devpath) + 2); > + devpath = grub_strndup (name, grub_strlen (name) + 2); > if (! devpath) > return grub_errno; > > `devpath' is clearly NULL here. Sorry, I don't know what you mean? If you mean this patch fixes a bug you introduced, please write a changelog so this can be committed ASAP. :) > I think it's in all our best interests to get a working strndup in > soon. :) Yeah! I guess you mean that you have tested grub_strndup and that it works? In that case please tell me so I can apply it now. :) Thanks, Marco