aboutsummaryrefslogtreecommitdiffstats
path: root/com32
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2009-10-12 15:59:21 -0700
committerH. Peter Anvin <hpa@zytor.com>2009-10-12 15:59:21 -0700
commit3d6f5132894acf54b1958ae190624fc0a774294f (patch)
treea41ad1ff2ee4c5cc99396ff02843d894ab9be9fa /com32
parentfee688790af77e282a3d04c9fb061089ec16a502 (diff)
downloadsyslinux-3d6f5132894acf54b1958ae190624fc0a774294f.tar.gz
syslinux-3d6f5132894acf54b1958ae190624fc0a774294f.tar.xz
syslinux-3d6f5132894acf54b1958ae190624fc0a774294f.zip
mboot: correct the detection of the multiboot header
Correct the detection of the multiboot header. The logic for when the header extends past the file was backwards, which broke non-ELF multiboot kernels completely. Apparently they are few and far between. Reported-by: Klaus T. <nightos@gmail.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'com32')
-rw-r--r--com32/mboot/map.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/com32/mboot/map.c b/com32/mboot/map.c
index 1a788ef7..887776fe 100644
--- a/com32/mboot/map.c
+++ b/com32/mboot/map.c
@@ -127,7 +127,7 @@ int map_image(void *ptr, size_t len)
else
mbh_len = 12;
- if (i + mbh_len < len)
+ if (i + mbh_len > len)
mbh_len = 0; /* Invalid... */
else
break; /* Found something... */