[prev in list] [next in list] [prev in thread] [next in thread] 

List:       wine-patches
Subject:    ntdll loader crash fix
From:       Juan Lang <juan_lang () yahoo ! com>
Date:       2003-08-30 19:15:17
[Download RAW message or body]

ChangeLog: fix RtlImageNtHeader crash when hModule is
NULL.

This is coming from ipconfig.exe calling
FormatMessage, there's another bug lurking in there
that I haven't figured out how to fix yet.

--Juan

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com
["ntdll.patch" (application/octet-stream)]

Index: dlls/ntdll/loader.c
===================================================================
RCS file: /home/wine/wine/dlls/ntdll/loader.c,v
retrieving revision 1.33
diff -u -r1.33 loader.c
--- dlls/ntdll/loader.c	27 Aug 2003 23:14:29 -0000	1.33
+++ dlls/ntdll/loader.c	30 Aug 2003 18:54:04 -0000
@@ -1426,7 +1426,7 @@
         IMAGE_DOS_HEADER *dos = (IMAGE_DOS_HEADER *)hModule;
 
         ret = NULL;
-        if (dos->e_magic == IMAGE_DOS_SIGNATURE)
+        if (dos && dos->e_magic == IMAGE_DOS_SIGNATURE)
         {
             ret = (IMAGE_NT_HEADERS *)((char *)dos + dos->e_lfanew);
             if (ret->Signature != IMAGE_NT_SIGNATURE) ret = NULL;


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic