Alexandre Julliard : preloader: Make sure the WINEPRELOADRESERVE area
doesn 't overlap the low memory area.
Alexandre Julliard
julliard at wine.codeweavers.com
Wed Jul 19 12:31:57 CDT 2006
Module: wine
Branch: refs/heads/master
Commit: 875b5db17bbedaeed7044bd81494d72f43f7a545
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=875b5db17bbedaeed7044bd81494d72f43f7a545
Author: Alexandre Julliard <julliard at winehq.org>
Date: Wed Jul 19 15:06:16 2006 +0200
preloader: Make sure the WINEPRELOADRESERVE area doesn't overlap the low memory area.
---
loader/preloader.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/loader/preloader.c b/loader/preloader.c
index 274d858..d9b749c 100644
--- a/loader/preloader.c
+++ b/loader/preloader.c
@@ -847,6 +847,12 @@ static void preload_reserve( const char
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;
More information about the wine-cvs
mailing list