diff options
| author | Roland McGrath <[email protected]> | 2008-01-22 01:56:41 +0000 |
|---|---|---|
| committer | Roland McGrath <[email protected]> | 2008-01-22 01:56:41 +0000 |
| commit | c58110d291bbd39e416d322076dc58bddf56bcf0 (patch) | |
| tree | 3de66c784a7767ece3fa01b2ad0f6403e88ec0cb /libdw/dwarf_getpubnames.c | |
| parent | c0d3c265f06daa943df2c990daab1ce059749d4b (diff) | |
explicit merge of 'f9dc98cac1b8ccd38e7420c43dfe7551e2923aaa'elfutils-0.132
and '90e87946af64cdaa0fc75d344ca35ee2729e655d'
Diffstat (limited to 'libdw/dwarf_getpubnames.c')
| -rw-r--r-- | libdw/dwarf_getpubnames.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/libdw/dwarf_getpubnames.c b/libdw/dwarf_getpubnames.c index 91dad311..08b96cdc 100644 --- a/libdw/dwarf_getpubnames.c +++ b/libdw/dwarf_getpubnames.c @@ -129,13 +129,10 @@ get_offsets (Dwarf *dbg) mem[cnt].cu_offset = read_8ubyte_unaligned (dbg, readp + 2); /* Determine the size of the CU header. */ - if (dbg->sectiondata[IDX_debug_info] == NULL - || dbg->sectiondata[IDX_debug_info]->d_buf == NULL - || mem[cnt].cu_offset + 3 >= dbg->sectiondata[IDX_debug_info]->d_size) - { - __libdw_seterrno (DWARF_E_INVALID_DWARF); - goto err_return; - } + assert (dbg->sectiondata[IDX_debug_info] != NULL); + assert (dbg->sectiondata[IDX_debug_info]->d_buf != NULL); + assert (mem[cnt].cu_offset + 3 + < dbg->sectiondata[IDX_debug_info]->d_size); unsigned char *infop = ((unsigned char *) dbg->sectiondata[IDX_debug_info]->d_buf + mem[cnt].cu_offset); |
