[PATCH] dbghelp: fix the annoying failure about 'wrong name EntryPoint'

Eric Pouech eric.pouech at gmail.com
Sat Aug 21 15:30:10 CDT 2021


Regression was introduced in d614ac46718311f49541b32ac726c17a06077ae1
by allowing to return the symbol with the lowest address in the module
even if the requested address was strictly below.

Signed-off-by: Eric Pouech <eric.pouech at gmail.com>

---
 dlls/dbghelp/symbol.c |    6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/dlls/dbghelp/symbol.c b/dlls/dbghelp/symbol.c
index b2b4d578910..570e2adb8b6 100644
--- a/dlls/dbghelp/symbol.c
+++ b/dlls/dbghelp/symbol.c
@@ -893,11 +893,7 @@ struct symt_ht* symt_find_nearest(struct module* module, DWORD_PTR addr)
     high = module->num_sorttab;
 
     symt_get_address(&module->addr_sorttab[0]->symt, &ref_addr);
-    if (addr <= ref_addr)
-    {
-        low = symt_get_best_at(module, 0);
-        return module->addr_sorttab[low];
-    }
+    if (addr < ref_addr) return NULL;
 
     if (high)
     {




More information about the wine-devel mailing list