Alexandre Julliard : ntdll: Allow module with extensions in forward specifications.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Dec 4 07:17:13 CST 2006


Module: wine
Branch: master
Commit: 84fb1e1f3f9a2ef488fda47c1256b9ce5f1fd4ac
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=84fb1e1f3f9a2ef488fda47c1256b9ce5f1fd4ac

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Mon Dec  4 13:37:32 2006 +0100

ntdll: Allow module with extensions in forward specifications.

---

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

diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index 87767e5..99c90c4 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -328,13 +328,18 @@ static FARPROC find_forwarded_export( HM
     DWORD exp_size;
     WINE_MODREF *wm;
     WCHAR mod_name[32];
-    const char *end = strchr(forward, '.');
+    const char *end = strrchr(forward, '.');
     FARPROC proc = NULL;
 
     if (!end) return NULL;
-    if ((end - forward) * sizeof(WCHAR) >= sizeof(mod_name) - sizeof(dllW)) return NULL;
+    if ((end - forward) * sizeof(WCHAR) >= sizeof(mod_name)) return NULL;
     ascii_to_unicode( mod_name, forward, end - forward );
-    memcpy( mod_name + (end - forward), dllW, sizeof(dllW) );
+    mod_name[end - forward] = 0;
+    if (!strchrW( mod_name, '.' ))
+    {
+        if ((end - forward) * sizeof(WCHAR) >= sizeof(mod_name) - sizeof(dllW)) return NULL;
+        memcpy( mod_name + (end - forward), dllW, sizeof(dllW) );
+    }
 
     if (!(wm = find_basename_module( mod_name )))
     {




More information about the wine-cvs mailing list