2006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
* loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
This commit is contained in:
parent
b786f3b5c3
commit
fd39d4da42
2 changed files with 14 additions and 1 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2006-06-09 Yoshinori K. Okuji <okuji@enbug.org>
|
||||||
|
|
||||||
|
* loader/i386/pc/linux.c (grub_rescue_cmd_initrd): Make sure that
|
||||||
|
ADDR_MAX does not exceed GRUB_LINUX_INITRD_MAX_ADDRESS.
|
||||||
|
|
||||||
2006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
|
2006-06-07 Jeroen Dekkers <jeroen@dekkers.cx>
|
||||||
|
|
||||||
* include/grub/types.h (grub_host_addr_t): Rename to
|
* include/grub/types.h (grub_host_addr_t): Rename to
|
||||||
|
|
|
@ -322,7 +322,15 @@ grub_rescue_cmd_initrd (int argc, char *argv[])
|
||||||
|
|
||||||
/* Get the highest address available for the initrd. */
|
/* Get the highest address available for the initrd. */
|
||||||
if (grub_le_to_cpu16 (lh->version) >= 0x0203)
|
if (grub_le_to_cpu16 (lh->version) >= 0x0203)
|
||||||
|
{
|
||||||
addr_max = grub_cpu_to_le32 (lh->initrd_addr_max);
|
addr_max = grub_cpu_to_le32 (lh->initrd_addr_max);
|
||||||
|
|
||||||
|
/* XXX in reality, Linux specifies a bogus value, so
|
||||||
|
it is necessary to make sure that ADDR_MAX does not exceed
|
||||||
|
0x3fffffff. */
|
||||||
|
if (addr_max > GRUB_LINUX_INITRD_MAX_ADDRESS)
|
||||||
|
addr_max = GRUB_LINUX_INITRD_MAX_ADDRESS;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
addr_max = GRUB_LINUX_INITRD_MAX_ADDRESS;
|
addr_max = GRUB_LINUX_INITRD_MAX_ADDRESS;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue