[PATCH] [DbgHelp]: protect dwarf parsing against NULL function names

Eric Pouech eric.pouech at orange.fr
Sun May 18 02:43:39 CDT 2008


as reported (partially) in #7620

A+
---

 dlls/dbghelp/dwarf.c |    6 +++++-
 1 files changed, 5 insertions(+), 1 deletions(-)


diff --git a/dlls/dbghelp/dwarf.c b/dlls/dbghelp/dwarf.c
index ec4c351..5f6458f 100644
--- a/dlls/dbghelp/dwarf.c
+++ b/dlls/dbghelp/dwarf.c
@@ -1571,7 +1571,11 @@ static struct symt* dwarf2_parse_subprogram(dwarf2_parse_context_t* ctx,
 
     TRACE("%s, for %s\n", dwarf2_debug_ctx(ctx), dwarf2_debug_di(di));
 
-    if (!dwarf2_find_attribute(ctx, di, DW_AT_name, &name)) name.u.string = NULL;
+    if (!dwarf2_find_attribute(ctx, di, DW_AT_name, &name))
+    {
+        WARN("No name for function... dropping function\n");
+        return NULL;
+    }
     /* if it's an abstract representation of an inline function, there should be
      * a concrete object that we'll handle
      */





More information about the wine-patches mailing list