[PATCH 1/8] dbghelp: fix potential crash when loading a builtin a PE module embedded in an ELF image

Eric Pouech eric.pouech at gmail.com
Mon Nov 22 08:19:46 CST 2021


(regression introduced by ced12a1a3aca214c64887e1dc65df67015015394)

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

---
 dlls/dbghelp/module.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dlls/dbghelp/module.c b/dlls/dbghelp/module.c
index fe65683c6e1..1b64bb57eb7 100644
--- a/dlls/dbghelp/module.c
+++ b/dlls/dbghelp/module.c
@@ -990,7 +990,7 @@ DWORD64 WINAPI  SymLoadModuleExW(HANDLE hProcess, HANDLE hFile, PCWSTR wImageNam
         module_remove(pcs, altmodule);
     }
 
-    if ((dbghelp_options & SYMOPT_DEFERRED_LOADS) == 0)
+    if ((dbghelp_options & SYMOPT_DEFERRED_LOADS) == 0 && !module_get_container(pcs, module))
         module_load_debug(module);
     return module->module.BaseOfImage;
 }




More information about the wine-devel mailing list