dbghelp: do not read from array element -1
Peter Oberndorfer
kumbayo84 at arcor.de
Sat Nov 4 13:24:56 CST 2006
when debug_line_sect is -1 we read from array element -1
also dwarf2 parser is not prepared to get 0xffffffff as memory location
Changelog:
dbghelp: do not read from array element -1 if ELF section .debug_line is not present
-------------- next part --------------
From 52d64286118f450f0c328f7410d905e52846e3b6 Mon Sep 17 00:00:00 2001
From: Peter Oberndorfer <kumbayo84 at arcor.de>
Date: Sat, 4 Nov 2006 20:05:27 +0100
Subject: [PATCH] dbghelp: do not read from array element -1
---
dlls/dbghelp/elf_module.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/dlls/dbghelp/elf_module.c b/dlls/dbghelp/elf_module.c
index 0c83984..e640e7e 100644
--- a/dlls/dbghelp/elf_module.c
+++ b/dlls/dbghelp/elf_module.c
@@ -894,7 +894,8 @@ static BOOL elf_load_debug_info_from_map
dw2_debug_abbrev = (const BYTE*) elf_map_section(fmap, debug_abbrev_sect);
dw2_debug_str = (const BYTE*) elf_map_section(fmap, debug_str_sect);
dw2_debug_line = (const BYTE*) elf_map_section(fmap, debug_line_sect);
- if (dw2_debug != NO_MAP && NO_MAP != dw2_debug_abbrev && dw2_debug_str != NO_MAP)
+ if (dw2_debug != NO_MAP && dw2_debug_abbrev != NO_MAP &&
+ dw2_debug_str != NO_MAP && dw2_debug_line != NO_MAP)
{
/* OK, now just parse dwarf2 debug infos. */
lret = dwarf2_parse(module, module->elf_info->elf_addr, thunks,
--
1.4.3.2
More information about the wine-patches
mailing list