From 29434648114f02b6717e8a78efa6b6b3f24a71c3 Mon Sep 17 00:00:00 2001 From: phcoder Date: Thu, 17 Sep 2009 10:03:12 +0200 Subject: [PATCH] fixed 64-bit loading --- loader/machoXX.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/loader/machoXX.c b/loader/machoXX.c index b07bab937..01e6879ea 100644 --- a/loader/machoXX.c +++ b/loader/machoXX.c @@ -129,6 +129,10 @@ SUFFIX (grub_macho_size) (grub_macho_t macho, grub_macho_addr_t *segments_start, grub_macho_segment_t *hdr = (grub_macho_segment_t *) hdr0; if (hdr->cmd != GRUB_MACHO_CMD_SEGMENT) return 0; + + if (! hdr->vmsize) + return 0; + if (! hdr->filesize && (flags & GRUB_MACHO_NOBSS)) return 0;