diff options
Diffstat (limited to 'libdwarf/libdwarf_abbrev.c')
-rw-r--r-- | libdwarf/libdwarf_abbrev.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libdwarf/libdwarf_abbrev.c b/libdwarf/libdwarf_abbrev.c index f4a395df0360..abcc2fda9580 100644 --- a/libdwarf/libdwarf_abbrev.c +++ b/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); |