[PATCH] ntdll: Do not segfault with snoop for exefiles with a broken export table

Detlef Riekenberg wine.dev at web.de
Tue Sep 25 16:15:00 CDT 2007


---
 dlls/ntdll/loader.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index 04172f9..fc04c3b 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -1444,7 +1444,8 @@ static NTSTATUS load_native_dll( LPCWSTR
     }
     SERVER_END_REQ;
 
-    if (TRACE_ON(snoop)) SNOOP_SetupDLL( module );
+    /* Some EXE-Files have a broken export table */
+    if ((wm->ldr.Flags & LDR_IMAGE_IS_DLL) && (TRACE_ON(snoop))) SNOOP_SetupDLL( module );
 
     TRACE_(loaddll)( " Loaded module %s : native\n", debugstr_w(wm->ldr.FullDllName.Buffer) );
 
-- 
1.4.1


--=-muOT3NUsCB72+3xi8dS7--




More information about the wine-patches mailing list