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>
else
mbh_len = 12;
- if (i + mbh_len < len)
+ if (i + mbh_len > len)
mbh_len = 0; /* Invalid... */
else
break; /* Found something... */