[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 1/5] multiboot2: Fix information request tag size calculation
From: |
Lennart Sorensen |
Subject: |
Re: [PATCH 1/5] multiboot2: Fix information request tag size calculation |
Date: |
Fri, 30 Jan 2015 16:21:15 -0500 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
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 <address@hidden>
> wrote:
>
> > Signed-off-by: Daniel Kiper <address@hidden>
> > ---
> > 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
> > address@hidden
> > https://lists.gnu.org/mailman/listinfo/grub-devel
> >
>
>
>
> --
> --
> Ben Hildred
> Automation Support Services
> 303 815 6721
> _______________________________________________
> Grub-devel mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/grub-devel
- [PATCH 0/5] multiboot2: Enable EFI boot services usage in loaded images, Daniel Kiper, 2015/01/30
- [PATCH 2/5] i386/relocator: Remove unused extern grub_relocator64_rip_addr, Daniel Kiper, 2015/01/30
- [PATCH 3/5] i386/relocator: Remove unused avoid_efi_bootservices argument, Daniel Kiper, 2015/01/30
- [PATCH 4/5] i386/relocator: Add grub_relocator64_efi relocator, Daniel Kiper, 2015/01/30
- [PATCH 5/5] multiboot2: Add tags used to pass ImageHandle to loaded image, Daniel Kiper, 2015/01/30