From: Ben Gras Date: Fri, 18 Jan 2013 02:24:00 +0000 (+0000) Subject: kernel: fix sanity check X-Git-Tag: v3.2.1~90 X-Git-Url: http://zhaoyanbai.com/repos/%22http:/www.isc.org/icons/zlib_tech.html?a=commitdiff_plain;h=dcff984d6aac535d99ef572738d094945dda6c56;p=minix.git kernel: fix sanity check --- diff --git a/kernel/arch/i386/pre_init.c b/kernel/arch/i386/pre_init.c index 3f9dfc44f..bf327adb3 100644 --- a/kernel/arch/i386/pre_init.c +++ b/kernel/arch/i386/pre_init.c @@ -87,9 +87,9 @@ int overlaps(multiboot_module_t *mod, int n, int cmp_mod) multiboot_module_t *cmp = &mod[cmp_mod]; int m; -#define INRANGE(mod, v) ((v) >= mod->mod_start && (v) <= thismod->mod_end) +#define INRANGE(mod, v) ((v) >= mod->mod_start && (v) < mod->mod_end) #define OVERLAP(mod1, mod2) (INRANGE(mod1, mod2->mod_start) || \ - INRANGE(mod1, mod2->mod_end)) + INRANGE(mod1, mod2->mod_end-1)) for(m = 0; m < n; m++) { multiboot_module_t *thismod = &mod[m]; if(m == cmp_mod) continue;