From c352d8dd0bca7341edb3acfd32f8b88d4b1f6d9b Mon Sep 17 00:00:00 2001 From: okuji Date: Thu, 20 Apr 2006 02:33:44 +0000 Subject: [PATCH] 2006-04-20 Yoshinori K. Okuji * 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 . --- ChangeLog | 6 ++++++ loader/i386/pc/linux.c | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index ec1822fef..8fed46ab7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2006-04-20 Yoshinori K. Okuji + + * 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 . + 2006-04-19 Roger Leigh * DISTLIST: Added `util/powerpc/ieee1275/grub-install.in'. diff --git a/loader/i386/pc/linux.c b/loader/i386/pc/linux.c index eac0f1523..f1a18a65a 100644 --- a/loader/i386/pc/linux.c +++ b/loader/i386/pc/linux.c @@ -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; }