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

Alexandre Julliard julliard at winehq.org
Mon Nov 22 16:05:17 CST 2021


Module: wine
Branch: master
Commit: f10635ab08e43853ce7a577286822399da92bece
URL:    https://source.winehq.org/git/wine.git/?a=commit;h=f10635ab08e43853ce7a577286822399da92bece

Author: Eric Pouech <eric.pouech at gmail.com>
Date:   Mon Nov 22 15:20:40 2021 +0100

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

Signed-off-by: Eric Pouech <eric.pouech at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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++)
     {




More information about the wine-cvs mailing list