preloader: Make sure the WINEPRELOADRESERVE area doesn't overlap the low memory area.

This commit is contained in:
Alexandre Julliard 2006-07-19 15:06:16 +02:00
parent 763e96abae
commit 875b5db17b
1 changed files with 6 additions and 0 deletions

View File

@ -847,6 +847,12 @@ static void preload_reserve( const char *str )
start = end = NULL;
}
/* check for overlap with low memory area */
if ((char *)end <= (char *)preload_info[0].addr + preload_info[0].size)
start = end = NULL;
else if ((char *)start < (char *)preload_info[0].addr + preload_info[0].size)
start = (char *)preload_info[0].addr + preload_info[0].size;
/* entry 2 is for the PE exe */
preload_info[2].addr = start;
preload_info[2].size = (char *)end - (char *)start;