Signed-off-by: Eric Pouech eric.pouech@gmail.com
--- dlls/dbghelp/module.c | 6 ++++++ 1 file changed, 6 insertions(+)
diff --git a/dlls/dbghelp/module.c b/dlls/dbghelp/module.c index 8119f941e2a..363f6314b22 100644 --- a/dlls/dbghelp/module.c +++ b/dlls/dbghelp/module.c @@ -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++) {