When a module like ext-ms-win-kernel32-package-current-l1-1-0 is loaded, it is never matched since the Module buffer is only 32 cahracters.
Signed-off-by: Alistair Leslie-Hughes leslie_alistair@hotmail.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 c278a627d37..c7b0f59ca4c 100644 --- a/dlls/dbghelp/module.c +++ b/dlls/dbghelp/module.c @@ -249,7 +249,7 @@ struct module* module_find_by_nameW(const struct process* pcs, const WCHAR* name
for (module = pcs->lmodules; module; module = module->next) { - if (!wcsicmp(name, module->module.ModuleName)) return module; + if (!wcsnicmp(name, module->module.ModuleName, ARRAYSIZE(module->module.ModuleName))) return module; } SetLastError(ERROR_INVALID_NAME); return NULL;
Le 03/09/2021 à 02:11, Alistair Leslie-Hughes a écrit :
When a module like ext-ms-win-kernel32-package-current-l1-1-0 is loaded, it is never matched since the Module buffer is only 32 cahracters.
Hi Alistair,
this doesn't match windows behaviour...
despite ModuleName being set to 32 characters in IMAGEHLP_MODULE64,
native dbghelp manages internally modules up to 64 characters (including terminating 0)
there's already a modulename field in builtin's struct module* which should be used (correctly set up to 64 chars)
module's name match should be made against this (with potential truncation)
and btw, there are some other places to be fixed as well (all that match against Module.ModuleName)
A+