[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH 1/5] multiboot2: Fix information request tag size calculation



Why do you want the size of a pointer instead of the size of the structure?

On Fri, Jan 30, 2015 at 10:59 AM, Daniel Kiper <daniel.kiper@xxxxxxxxxx> wrote:
Signed-off-by: Daniel Kiper <daniel.kiper@xxxxxxxxxx>
---
Â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@xxxxxxx
https://lists.gnu.org/mailman/listinfo/grub-devel



--
--
Ben Hildred
Automation Support Services
303 815 6721
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.