dbghelp: In SymEnumerateLoadedModules, don't limit the number of modules.

Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Eric Pouech 2021-11-22 15:20:40 +01:00 committed by Alexandre Julliard
parent 4cc7a3ba90
commit f10635ab08
1 changed files with 6 additions and 0 deletions

View File

@ -1249,6 +1249,12 @@ BOOL WINAPI EnumerateLoadedModulesW64(HANDLE hProcess,
HeapFree(GetProcessHeap(), 0, hMods);
return FALSE;
}
if (sz > 256 * sizeof(hMods[0]))
{
hMods = HeapReAlloc(GetProcessHeap(), 0, hMods, sz);
if (!hMods || !EnumProcessModules(hProcess, hMods, sz, &sz))
return FALSE;
}
sz /= sizeof(HMODULE);
for (i = 0; i < sz; i++)
{