diff options
author | Roland McGrath <roland@redhat.com> | 2010-06-20 17:25:35 -0700 |
---|---|---|
committer | Roland McGrath <roland@redhat.com> | 2010-06-20 17:25:35 -0700 |
commit | 5cc030d6169713ff4711c28a6ce1250b142cd5b3 (patch) | |
tree | 812fddfdaac429d454398fcc38e8f45123cc1003 /libdw/dwarf_formblock.c | |
parent | 183e8abb7bce1b51759f1f16529db7f31e3ec705 (diff) | |
download | android_external_elfutils-5cc030d6169713ff4711c28a6ce1250b142cd5b3.tar.gz android_external_elfutils-5cc030d6169713ff4711c28a6ce1250b142cd5b3.tar.bz2 android_external_elfutils-5cc030d6169713ff4711c28a6ce1250b142cd5b3.zip |
Fix up some holes in .debug_types support.
Diffstat (limited to 'libdw/dwarf_formblock.c')
-rw-r--r-- | libdw/dwarf_formblock.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/libdw/dwarf_formblock.c b/libdw/dwarf_formblock.c index 6d7b9d39..4eb815c4 100644 --- a/libdw/dwarf_formblock.c +++ b/libdw/dwarf_formblock.c @@ -95,9 +95,10 @@ dwarf_formblock (attr, return_block) return -1; } - if (return_block->data + return_block->length - > ((unsigned char *) attr->cu->dbg->sectiondata[IDX_debug_info]->d_buf - + attr->cu->dbg->sectiondata[IDX_debug_info]->d_size)) + if (unlikely (cu_data (attr->cu)->d_size + - (return_block->data + - (unsigned char *) cu_data (attr->cu)->d_buf) + < return_block->length)) { /* Block does not fit. */ __libdw_seterrno (DWARF_E_INVALID_DWARF); |