From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1YHJ0I-00051v-Pa for mharc-grub-devel@gnu.org; Fri, 30 Jan 2015 16:21:26 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:60689) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YHJ0F-00050X-S7 for grub-devel@gnu.org; Fri, 30 Jan 2015 16:21:25 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YHJ0A-0006ck-RJ for grub-devel@gnu.org; Fri, 30 Jan 2015 16:21:23 -0500 Received: from mail.csclub.uwaterloo.ca ([129.97.134.52]:52351) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YHJ0A-0006ca-OJ for grub-devel@gnu.org; Fri, 30 Jan 2015 16:21:18 -0500 Received: from caffeine.csclub.uwaterloo.ca (caffeine.csclub.uwaterloo.ca [129.97.134.17]) by mail.csclub.uwaterloo.ca (Postfix) with SMTP id C661735314; Fri, 30 Jan 2015 16:21:15 -0500 (EST) Received: by caffeine.csclub.uwaterloo.ca (sSMTP sendmail emulation); Fri, 30 Jan 2015 16:21:15 -0500 From: "Lennart Sorensen" Date: Fri, 30 Jan 2015 16:21:15 -0500 To: The development of GNU GRUB Subject: Re: [PATCH 1/5] multiboot2: Fix information request tag size calculation Message-ID: <20150130212115.GX30245@csclub.uwaterloo.ca> References: <1422640768-28181-1-git-send-email-daniel.kiper@oracle.com> <1422640768-28181-2-git-send-email-daniel.kiper@oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 129.97.134.52 Cc: jgross@suse.com, keir@xen.org, ian.campbell@citrix.com, stefano.stabellini@eu.citrix.com, andrew.cooper3@citrix.com, roy.franz@linaro.org, ning.sun@intel.com, david.vrabel@citrix.com, jbeulich@suse.com, Vladimir Serbinenko , xen-devel@lists.xenproject.org, qiaowei.ren@intel.com, richard.l.maliszewski@intel.com, gang.wei@intel.com, fu.wei@linaro.org X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Jan 2015 21:21:25 -0000 On Fri, Jan 30, 2015 at 01:52:09PM -0700, Ben Hildred wrote: > Why do you want the size of a pointer instead of the size of the structure? Isn't *request_tag the dereferenced pointer, and hence is the size of the structure, where as before it was the size of a pointer? -- Len Sorensen > On Fri, Jan 30, 2015 at 10:59 AM, Daniel Kiper > wrote: > > > Signed-off-by: Daniel Kiper > > --- > > grub-core/loader/multiboot_mbi2.c | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/grub-core/loader/multiboot_mbi2.c > > b/grub-core/loader/multiboot_mbi2.c > > index 6f74aee..d7c19bc 100644 > > --- a/grub-core/loader/multiboot_mbi2.c > > +++ b/grub-core/loader/multiboot_mbi2.c > > @@ -150,7 +150,7 @@ grub_multiboot_load (grub_file_t file, const char > > *filename) > > = (struct multiboot_header_tag_information_request *) tag; > > if (request_tag->flags & MULTIBOOT_HEADER_TAG_OPTIONAL) > > break; > > - for (i = 0; i < (request_tag->size - sizeof (request_tag)) > > + for (i = 0; i < (request_tag->size - sizeof (*request_tag)) > > / sizeof (request_tag->requests[0]); i++) > > switch (request_tag->requests[i]) > > { > > -- > > 1.7.10.4 > > > > > > _______________________________________________ > > Grub-devel mailing list > > Grub-devel@gnu.org > > https://lists.gnu.org/mailman/listinfo/grub-devel > > > > > > -- > -- > Ben Hildred > Automation Support Services > 303 815 6721 > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > https://lists.gnu.org/mailman/listinfo/grub-devel