multiboot2: Fix information request tag size calculation

Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
Daniel Kiper 2015-01-30 18:59:24 +01:00 committed by Andrei Borzenkov
parent fc535b32b9
commit 8e5bc2f4d3

View file

@ -150,7 +150,7 @@ grub_multiboot_load (grub_file_t file, const char *filename)
= (struct multiboot_header_tag_information_request *) tag; = (struct multiboot_header_tag_information_request *) tag;
if (request_tag->flags & MULTIBOOT_HEADER_TAG_OPTIONAL) if (request_tag->flags & MULTIBOOT_HEADER_TAG_OPTIONAL)
break; 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++) / sizeof (request_tag->requests[0]); i++)
switch (request_tag->requests[i]) switch (request_tag->requests[i])
{ {