aboutsummaryrefslogtreecommitdiff
path: root/contrib/elftoolchain/libdwarf/libdwarf_abbrev.c
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/elftoolchain/libdwarf/libdwarf_abbrev.c')
-rw-r--r--contrib/elftoolchain/libdwarf/libdwarf_abbrev.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/contrib/elftoolchain/libdwarf/libdwarf_abbrev.c b/contrib/elftoolchain/libdwarf/libdwarf_abbrev.c
index f4a395df0360..abcc2fda9580 100644
--- a/contrib/elftoolchain/libdwarf/libdwarf_abbrev.c
+++ b/contrib/elftoolchain/libdwarf/libdwarf_abbrev.c
@@ -27,7 +27,7 @@
#include "_libdwarf.h"
-ELFTC_VCSID("$Id: libdwarf_abbrev.c 2070 2011-10-27 03:05:32Z jkoshy $");
+ELFTC_VCSID("$Id: libdwarf_abbrev.c 3136 2014-12-24 16:04:38Z kaiwang27 $");
int
_dwarf_abbrev_add(Dwarf_CU cu, uint64_t entry, uint64_t tag, uint8_t children,
@@ -180,7 +180,9 @@ _dwarf_abbrev_find(Dwarf_CU cu, uint64_t entry, Dwarf_Abbrev *abp,
/* Load and search the abbrev table. */
ds = _dwarf_find_section(cu->cu_dbg, ".debug_abbrev");
- assert(ds != NULL);
+ if (ds == NULL)
+ return (DW_DLE_NO_ENTRY);
+
offset = cu->cu_abbrev_offset_cur;
while (offset < ds->ds_size) {
ret = _dwarf_abbrev_parse(cu->cu_dbg, cu, &offset, &ab, error);