From 8e5bc2f4d3767485e729ed96ea943570d1cb1e45 Mon Sep 17 00:00:00 2001 From: Daniel Kiper Date: Fri, 30 Jan 2015 18:59:24 +0100 Subject: [PATCH] multiboot2: Fix information request tag size calculation 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 6f74aeef7..d7c19bc99 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]) {