From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MPK68-0002ZK-Ml for mharc-grub-devel@gnu.org; Fri, 10 Jul 2009 13:41:24 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MPK66-0002XN-K7 for grub-devel@gnu.org; Fri, 10 Jul 2009 13:41:22 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MPK62-0002Te-RQ for grub-devel@gnu.org; Fri, 10 Jul 2009 13:41:22 -0400 Received: from [199.232.76.173] (port=34524 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MPK62-0002TW-Jx for grub-devel@gnu.org; Fri, 10 Jul 2009 13:41:18 -0400 Received: from aybabtu.com ([69.60.117.155]:40130) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1MPK62-0000Gs-7W for grub-devel@gnu.org; Fri, 10 Jul 2009 13:41:18 -0400 Received: from [192.168.10.10] (helo=thorin) by aybabtu.com with esmtp (Exim 4.69) (envelope-from ) id 1MPJ1M-0001yb-Am for grub-devel@gnu.org; Fri, 10 Jul 2009 18:32:24 +0200 Received: from rmh by thorin with local (Exim 4.69) (envelope-from ) id 1MPK5z-0004Wm-A6 for grub-devel@gnu.org; Fri, 10 Jul 2009 19:41:15 +0200 Date: Fri, 10 Jul 2009 19:41:15 +0200 From: Robert Millan To: The development of GRUB 2 Message-ID: <20090710174115.GI17114@thorin> References: <20090709160301.GA29422@thorin> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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, 1) Subject: Re: OLPC regression, ofdisk stops working 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: Fri, 10 Jul 2009 17:41:23 -0000 On Fri, Jul 10, 2009 at 10:28:03PM +0800, Bean wrote: > Hi, > > There is something wrong with r2132, now childtype is a pointer, so > sizeof childtype == 4, the name would be truncated to 4 characters. Bean, you never cease to amaze me. I admit the "interesting, exactly the word size" idea crossed my head, but I didn't reach any conclussion out of it :-) Nice catch. Will you commit this, or want me to? > diff --git a/kern/ieee1275/openfw.c b/kern/ieee1275/openfw.c > index e7979f4..42d9278 100644 > --- a/kern/ieee1275/openfw.c > +++ b/kern/ieee1275/openfw.c > @@ -78,15 +78,15 @@ grub_children_iterate (char *devpath, > grub_ssize_t actual; > > if (grub_ieee1275_get_property (child, "device_type", childtype, > - sizeof childtype, &actual)) > + IEEE1275_MAX_PROP_LEN, &actual)) > continue; > > - if (grub_ieee1275_package_to_path (child, childpath, sizeof childpath, > - &actual)) > + if (grub_ieee1275_package_to_path (child, childpath, > + IEEE1275_MAX_PATH_LEN, &actual)) > continue; > > if (grub_ieee1275_get_property (child, "name", childname, > - sizeof childname, &actual)) > + IEEE1275_MAX_PATH_LEN, &actual)) > continue; > > grub_sprintf (fullname, "%s/%s", devpath, childname); -- 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."