[PATCH] [DbgHelp]: dwarf's symbol cache: fix erroneous access to symbol cache

Eric Pouech eric.pouech at orange.fr
Tue Feb 12 14:25:33 CST 2008


(spotted by Dan Kegel with valgrind)

A+
---

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


diff --git a/dlls/dbghelp/dwarf.c b/dlls/dbghelp/dwarf.c
index aee3dea..81f3c7f 100644
--- a/dlls/dbghelp/dwarf.c
+++ b/dlls/dbghelp/dwarf.c
@@ -980,7 +980,7 @@ static struct symt* dwarf2_parse_base_type(dwarf2_parse_context_t* ctx,
         break;
     default: break;
     }
-    if (!ctx->symt_cache[cache_idx])
+    if (cache_idx != -1 && !ctx->symt_cache[cache_idx])
         ctx->symt_cache[cache_idx] = di->symt;
 
     if (di->abbrev->have_child) FIXME("Unsupported children\n");





More information about the wine-patches mailing list