Eric Pouech : kernel: Resource browsing.
Alexandre Julliard
julliard at wine.codeweavers.com
Thu Mar 30 05:44:23 CST 2006
Module: wine
Branch: refs/heads/master
Commit: 038e604fe4cadb0d4471d6ac0d888c0c6a85cb20
URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=038e604fe4cadb0d4471d6ac0d888c0c6a85cb20
Author: Eric Pouech <eric.pouech at wanadoo.fr>
Date: Wed Mar 29 21:23:18 2006 +0200
kernel: Resource browsing.
Try to be a bit more strict when checking for resource mapping in
exception handler (and prevent some exceptions while in exception
handler).
---
dlls/kernel/except.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/dlls/kernel/except.c b/dlls/kernel/except.c
index 1c97a2e..95c5ce9 100644
--- a/dlls/kernel/except.c
+++ b/dlls/kernel/except.c
@@ -403,7 +403,7 @@ inline static BOOL check_resource_write(
if (!rec->ExceptionInformation[0]) return FALSE; /* not a write access */
addr = (void *)rec->ExceptionInformation[1];
if (!VirtualQuery( addr, &info, sizeof(info) )) return FALSE;
- if (info.State == MEM_FREE) return FALSE;
+ if (info.State == MEM_FREE || !(info.Type & MEM_IMAGE)) return FALSE;
if (!(rsrc = RtlImageDirectoryEntryToData( (HMODULE)info.AllocationBase, TRUE,
IMAGE_DIRECTORY_ENTRY_RESOURCE, &size )))
return FALSE;
More information about the wine-cvs
mailing list