]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
Don't cast entry_addr to an int.
authorgord <gord@localhost>
Wed, 28 Mar 2001 17:22:34 +0000 (17:22 +0000)
committergord <gord@localhost>
Wed, 28 Mar 2001 17:22:34 +0000 (17:22 +0000)
ChangeLog
stage2/boot.c

index 062f47938ff6eeb82dfda860041da9d1bff93025..a5a9145a8d9e33e9eef9fc8ce0e9559f434375cf 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2001-03-28  Gordon Matzigkeit  <gord@fig.org>
+
+       * stage2/boot.c (load_image): Don't cast entry_addr to an int, or
+       the top bit will be interpreted as the sign.
+
 2001-03-16  OKUJI Yoshinori  <okuji@gnu.org>
 
        From Bodo Rueskamp <br@itchigo.com>:
        (check_password): New function.
        * stage2/cmdline.c (run_script): Don't show commands that have
        the hidden attribute.
-       * stage2/buildins.c (password_type): New variable.
+       * stage2/builtins.c (password_type): New variable.
        (check_password): New function.
        (password_func): Handle the --md5 option and set password_type.
        Check if in CMDLINE or SCRIPT mode and ask password immediately.
index 519766e45e36f77a6a352aa4bc5ab55eef9e8a1c..beb92705595af83beac618b9fd9c160cbcf23002 100644 (file)
@@ -107,7 +107,7 @@ load_image (char *kernel, char *arg, kernel_t suggested_type,
       else
        entry_addr = (entry_func) (pu.elf->e_entry & 0xFFFFFF);
 
-      if (((int) entry_addr) < 0x100000)
+      if (entry_addr < (entry_func) 0x100000)
        errnum = ERR_BELOW_1MB;
 
       /* don't want to deal with ELF program header at some random