Eric Pouech : dbghelp: Fix erroneous access to dwarf symbol cache.

Alexandre Julliard julliard at winehq.org
Tue Feb 12 16:46:15 CST 2008


Module: wine
Branch: master
Commit: 4823663957b9cc92e5387e614ea4478d6501d0af
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=4823663957b9cc92e5387e614ea4478d6501d0af

Author: Eric Pouech <eric.pouech at orange.fr>
Date:   Tue Feb 12 21:25:33 2008 +0100

dbghelp: Fix erroneous access to dwarf symbol cache.

(Spotted by Dan Kegel with valgrind).

---

 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-cvs mailing list