From 50fa325cd0916f303204776bd480db1607d1ac59 Mon Sep 17 00:00:00 2001 From: okuji Date: Tue, 3 Aug 1999 15:45:15 +0000 Subject: [PATCH] fix a stupid bug --- ChangeLog | 5 +++++ stage2/boot.c | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index ee0ab73dc..1d8beb28b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +1999-08-04 OKUJI Yoshinori + + * boot.c (load_image): Fix a strcmp test. Reported by Pavel + Roskin . + 1999-08-03 OKUJI Yoshinori From "Dan J. Walters" : diff --git a/stage2/boot.c b/stage2/boot.c index 545ff4a8e..24d3a83bf 100644 --- a/stage2/boot.c +++ b/stage2/boot.c @@ -87,7 +87,7 @@ load_image (void) } /* ELF loading supported if multiboot and FreeBSD. */ - if ((type == 'm' || grub_strcmp (pu.elf->e_ident + EI_BRAND, "FreeBSD")) + if ((type == 'm' || grub_strcmp (pu.elf->e_ident + EI_BRAND, "FreeBSD") == 0) && len > sizeof (Elf32_Ehdr) && BOOTABLE_I386_ELF ((*((Elf32_Ehdr *) buffer)))) {