summaryrefslogtreecommitdiff
path: root/libdw
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2008-01-22 05:59:26 +0000
committerUlrich Drepper <drepper@redhat.com>2008-01-22 05:59:26 +0000
commitc911d5c907edcaf80792be1abac0262439fd9082 (patch)
tree08c44e8f01ee30192ca34338211119909a4d9293 /libdw
parenta9f3660eb17167f57ab308ec54a4e8d4c902858a (diff)
downloadelfutils-c911d5c907edcaf80792be1abac0262439fd9082.tar.gz
merge of '33d6cda327b8cb82fe8be29c24addb2bdf40acff'
and '4f7c8e6f95ff49761dd62bf932f09597f5838ab8'
Diffstat (limited to 'libdw')
-rw-r--r--libdw/dwarf_getpubnames.c11
-rw-r--r--libdw/dwarf_siblingof.c2
2 files changed, 6 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);
diff --git a/libdw/dwarf_siblingof.c b/libdw/dwarf_siblingof.c
index ac9d2877..2f451d5d 100644
--- a/libdw/dwarf_siblingof.c
+++ b/libdw/dwarf_siblingof.c
@@ -56,6 +56,7 @@
#include <dwarf.h>
#include <string.h>
+
int
dwarf_siblingof (die, result)
Dwarf_Die *die;
@@ -113,6 +114,7 @@ dwarf_siblingof (die, result)
/* This abbreviation has children. */
++level;
+
while (1)
{
/* Make sure we are still in range. Some producers might skip