[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Incorrect size of multiboot_info struct
From: |
Владимир Андреев |
Subject: |
Incorrect size of multiboot_info struct |
Date: |
Mon, 27 Nov 2017 00:30:40 +0300 |
Hello!
File include/multiboot.h contains definition of multiboot_info struct.
According to Multiboot spec v.0.6.96 size of this struct should be 116 bytes.
But in pointed header real size of this struct is 120 bytes that easily can be
verified using sizeof operator.
Such difference is due to alignment of color_info field (+2 bytes) and padding
at the end of this struct (+2 more bytes).
Can we just apply GRUB_PACKED macro to definition of this struct to fix current
inconsistence? If we do it, color_info will be moved back at 2 bytes and it's
most important thing. Also final 2 bytes of struct in question will be dropped,
but it's has no matter.
--
With best regards, Vladimir Andreev
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Incorrect size of multiboot_info struct,
Владимир Андреев <=