Mark Harmstone : ntdll: Take into account ordinal base when resolving forwarded ordinals.

Alexandre Julliard julliard at winehq.org
Wed Mar 24 16:20:39 CDT 2021


Module: wine
Branch: master
Commit: 3fd9a423d426cc2ed949e075417e1d0ebe901102
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=3fd9a423d426cc2ed949e075417e1d0ebe901102

Author: Mark Harmstone <mark at harmstone.com>
Date:   Wed Mar 24 01:18:59 2021 +0000

ntdll: Take into account ordinal base when resolving forwarded ordinals.

Signed-off-by: Mark Harmstone <mark at harmstone.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

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

diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index eddceb60623..ff88c6c5b5e 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -642,9 +642,11 @@ static FARPROC find_forwarded_export( HMODULE module, const char *forward, LPCWS
                                                  IMAGE_DIRECTORY_ENTRY_EXPORT, &exp_size )))
     {
         const char *name = end + 1;
-        if (*name == '#')  /* ordinal */
-            proc = find_ordinal_export( wm->ldr.DllBase, exports, exp_size, atoi(name+1), load_path );
-        else
+
+        if (*name == '#') { /* ordinal */
+            proc = find_ordinal_export( wm->ldr.DllBase, exports, exp_size,
+                                        atoi(name+1) - exports->Base, load_path );
+        } else
             proc = find_named_export( wm->ldr.DllBase, exports, exp_size, name, -1, load_path );
     }
 




More information about the wine-cvs mailing list