Eric Pouech : dbghelp: Protect against missing compiland when adding global function.

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


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

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

dbghelp: Protect against missing compiland when adding global function.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52045
Signed-off-by: Eric Pouech <eric.pouech at gmail.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 dlls/dbghelp/symbol.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/dlls/dbghelp/symbol.c b/dlls/dbghelp/symbol.c
index 435d94bc8eb..2443dbf7e73 100644
--- a/dlls/dbghelp/symbol.c
+++ b/dlls/dbghelp/symbol.c
@@ -353,8 +353,11 @@ struct symt_function* symt_new_function(struct module* module,
         init_function_or_inlinesite(sym, module, SymTagFunction, &compiland->symt, name, addr, size, sig_type);
         sym->next_inlinesite = NULL; /* first of list */
         symt_add_module_ht(module, (struct symt_ht*)sym);
-        p = vector_add(&compiland->vchildren, &module->pool);
-        *p = &sym->symt;
+        if (compiland)
+        {
+            p = vector_add(&compiland->vchildren, &module->pool);
+            *p = &sym->symt;
+        }
     }
     return sym;
 }




More information about the wine-cvs mailing list