mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-21 06:49:35 +00:00
2002-04-30 Yoshinori K. Okuji <okuji@enbug.org>
From Jean-Jacques Michel <jjmichel@linbox.com>: * stage2/boot.c (load_image): For Linux, check if DATA_LEN is greater than MULTIBOOT_SEARCH. If that's true, read the rest after copying data already read in BUFFER.
This commit is contained in:
1 parent
73d5c0f09c
commit
20ac296c28
3 files changed
+19
-1
No files matched your search
@@ -1,3 +1,10 @@
|
|||||||
|
2002-04-30 Yoshinori K. Okuji <okuji@enbug.org>
|
||||||
|
|
||||||
|
From Jean-Jacques Michel <jjmichel@linbox.com>:
|
||||||
|
* stage2/boot.c (load_image): For Linux, check if DATA_LEN is
|
||||||
|
greater than MULTIBOOT_SEARCH. If that's true, read the rest
|
||||||
|
after copying data already read in BUFFER.
|
||||||
|
|
||||||
2002-04-30 Yoshinori K. Okuji <okuji@enbug.org>
|
2002-04-30 Yoshinori K. Okuji <okuji@enbug.org>
|
||||||
|
|
||||||
* stage2/boot.c (load_image): For Linux, don't check if the
|
* stage2/boot.c (load_image): For Linux, don't check if the
|
||||||
|
|||||||
@@ -45,6 +45,7 @@ HORIKAWA Kazunori <kaz-hori@tkd.att.ne.jp>
|
|||||||
Jan Fricke <fricke@uni-greifswald.de>
|
Jan Fricke <fricke@uni-greifswald.de>
|
||||||
Jan Zerebecki <jan.list@elite-pferde.de>
|
Jan Zerebecki <jan.list@elite-pferde.de>
|
||||||
Jason Thomas <jason@topic.com.au>
|
Jason Thomas <jason@topic.com.au>
|
||||||
|
Jean-Jacques Michel <jjmichel@linbox.com>
|
||||||
Jeremy Katz <katzj@redhat.com>
|
Jeremy Katz <katzj@redhat.com>
|
||||||
Jochen Hoenicke <jochen@gnu.org>
|
Jochen Hoenicke <jochen@gnu.org>
|
||||||
Johannes Kroeger <hanne@squirrel.owl.de>
|
Johannes Kroeger <hanne@squirrel.owl.de>
|
||||||
|
|||||||
+11
-1
@@ -353,7 +353,17 @@ load_image (char *kernel, char *arg, kernel_t suggested_type,
|
|||||||
linux_mem_size = 0;
|
linux_mem_size = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
memmove ((char *) LINUX_SETUP, buffer, data_len + SECTOR_SIZE);
|
/* It is possible that DATA_LEN is greater than MULTIBOOT_SEARCH,
|
||||||
|
so the data may have been read partially. */
|
||||||
|
if (data_len <= MULTIBOOT_SEARCH)
|
||||||
|
grub_memmove ((char *) LINUX_SETUP, buffer,
|
||||||
|
data_len + SECTOR_SIZE);
|
||||||
|
else
|
||||||
|
{
|
||||||
|
grub_memmove ((char *) LINUX_SETUP, buffer, MULTIBOOT_SEARCH);
|
||||||
|
grub_read ((char *) LINUX_SETUP + MULTIBOOT_SEARCH,
|
||||||
|
data_len + SECTOR_SIZE - MULTIBOOT_SEARCH);
|
||||||
|
}
|
||||||
|
|
||||||
if (lh->header != LINUX_MAGIC_SIGNATURE ||
|
if (lh->header != LINUX_MAGIC_SIGNATURE ||
|
||||||
lh->version < 0x0200)
|
lh->version < 0x0200)
|
||||||
|
|||||||
Reference in new issue
Block a user