2003-03-19 Yoshinori K. Okuji <okuji@enbug.org>

* stage2/boot.c (load_image): Check if DATA_LEN plus SECTOR_SIZE
	is less than or equal to MULTIBOOT_SEARCH, instead of if
	DATA_LEN is less than or equal to MULTIBOOT_SEARCH.
	Reported by Neelkanth Natu <neelnatu@yahoo.com>.
This commit is contained in:
okuji 2003-03-18 21:07:35 +00:00
parent 703e8d6852
commit 0151ef5e78
3 changed files with 12 additions and 4 deletions

View file

@ -1,3 +1,10 @@
2003-03-19 Yoshinori K. Okuji <okuji@enbug.org>
* stage2/boot.c (load_image): Check if DATA_LEN plus SECTOR_SIZE
is less than or equal to MULTIBOOT_SEARCH, instead of if
DATA_LEN is less than or equal to MULTIBOOT_SEARCH.
Reported by Neelkanth Natu <neelnatu@yahoo.com>.
2003-03-10 Yoshinori K. Okuji <okuji@enbug.org>
From Andrew Walrond <andrew@walrond.org>:

1
THANKS
View file

@ -79,6 +79,7 @@ Michael Sullivan <mike@trdlnk.com>
Mike Meyer <mwm@mired.org>
Miles Bader <miles@gnu.org>
Neal H Walfield <neal@walfield.org>
Neelkanth Natu <neelnatu@yahoo.com>
OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>
Pavel Roskin <pavel_roskin@geocities.com>
Per Lundberg <plundis@byggdok.se>

View file

@ -1,7 +1,7 @@
/* boot.c - load and bootstrap a kernel */
/*
* GRUB -- GRand Unified Bootloader
* Copyright (C) 1999,2000,2001,2002 Free Software Foundation, Inc.
* Copyright (C) 1999,2000,2001,2002,2003 Free Software Foundation, Inc.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -373,9 +373,9 @@ load_image (char *kernel, char *arg, kernel_t suggested_type,
linux_mem_size = 0;
}
/* It is possible that DATA_LEN is greater than MULTIBOOT_SEARCH,
so the data may have been read partially. */
if (data_len <= MULTIBOOT_SEARCH)
/* It is possible that DATA_LEN + SECTOR_SIZE is greater than
MULTIBOOT_SEARCH, so the data may have been read partially. */
if (data_len + SECTOR_SIZE <= MULTIBOOT_SEARCH)
grub_memmove (linux_data_tmp_addr, buffer,
data_len + SECTOR_SIZE);
else