Fix for Access Violation in Loader.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

current_modref is not initialized to the current modref, causing
find_forwarded_export to try and dereference a NULL pointer. I guess this
was a copy and paste error when the functions were moved into NTDLL. I
wasn't sure what side-effects initializing current_modref properly would
have, so I just get the modref from the module handle, which may or may not
be right. I also haven't checked for occurances of this bug anywhere else in
the file.

License: LGPL
ChangeLog:
- Fix NULL pointer error when displaying error message about missing
forwarded export
Index: wine/dlls/ntdll/loader.c
===================================================================
RCS file: /home/wine/wine/dlls/ntdll/loader.c,v
retrieving revision 1.24
diff -u -r1.24 loader.c
--- wine/dlls/ntdll/loader.c	8 May 2003 04:13:26 -0000	1.24
+++ wine/dlls/ntdll/loader.c	11 May 2003 23:32:19 -0000
@@ -123,7 +123,7 @@
 
     if (!(wm = MODULE_FindModule( mod_name )))
     {
-        ERR("module not found for forward '%s' used by '%s'\n", forward, current_modref->filename );
+        ERR("module not found for forward '%s' used by '%s'\n", forward, get_modref(module)->filename );
         return NULL;
     }
     if ((exports = RtlImageDirectoryEntryToData( wm->ldr.BaseAddress, TRUE,
@@ -134,7 +134,7 @@
     {
         ERR("function not found for forward '%s' used by '%s'."
             " If you are using builtin '%s', try using the native one instead.\n",
-            forward, current_modref->filename, current_modref->modname );
+            forward, get_modref(module)->filename, get_modref(module)->modname );
     }
     return proc;
 }


[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux