diff --git a/ChangeLog b/ChangeLog index 35042ca65..66c99da6c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2003-03-19 Yoshinori K. Okuji + + * 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 . + 2003-03-10 Yoshinori K. Okuji From Andrew Walrond : diff --git a/THANKS b/THANKS index 68c622b9e..d5dfb8f32 100644 --- a/THANKS +++ b/THANKS @@ -79,6 +79,7 @@ Michael Sullivan Mike Meyer Miles Bader Neal H Walfield +Neelkanth Natu OKUJI Yoshinori Pavel Roskin Per Lundberg diff --git a/stage2/boot.c b/stage2/boot.c index ace0d1f02..905cf0ec4 100644 --- a/stage2/boot.c +++ b/stage2/boot.c @@ -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