2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>

* loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
        size with GRUB_OS_AREA_SIZE as grub_size_t instead of
        grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
This commit is contained in:
okuji 2006-04-20 02:33:44 +00:00
parent 6d01d6b4a6
commit c352d8dd0b
2 changed files with 10 additions and 2 deletions

View file

@ -1,3 +1,9 @@
2006-04-20 Yoshinori K. Okuji <okuji@enbug.org>
* loader/i386/pc/linux.c (grub_rescue_cmd_linux): Compare the file
size with GRUB_OS_AREA_SIZE as grub_size_t instead of
grub_ssize_t. Reported by Jeff Chua <jeff84@silk.corp.fedex.com>.
2006-04-19 Roger Leigh <rleigh@whinlatter.ukfsn.org>
* DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'.

View file

@ -81,9 +81,11 @@ grub_rescue_cmd_linux (int argc, char *argv[])
if (! file)
goto fail;
if (grub_file_size (file) > (grub_ssize_t) grub_os_area_size)
if ((grub_size_t) grub_file_size (file) > grub_os_area_size)
{
grub_error (GRUB_ERR_OUT_OF_RANGE, "too big kernel");
grub_error (GRUB_ERR_OUT_OF_RANGE, "too big kernel (0x%x > 0x%x)",
(grub_size_t) grub_file_size (file),
grub_os_area_size);
goto fail;
}