diff options
author | Ulrich Drepper <[email protected]> | 2008-01-21 20:38:27 +0000 |
---|---|---|
committer | Ulrich Drepper <[email protected]> | 2008-01-21 20:38:27 +0000 |
commit | a9f3660eb17167f57ab308ec54a4e8d4c902858a (patch) | |
tree | 4b5bcd903d2f7b9c3ba05079572818b9dfda9da0 /libdw | |
parent | c58110d291bbd39e416d322076dc58bddf56bcf0 (diff) |
Update copyright year.
Diffstat (limited to 'libdw')
-rw-r--r-- | libdw/dwarf_getpubnames.c | 11 | ||||
-rw-r--r-- | libdw/dwarf_siblingof.c | 2 |
2 files changed, 7 insertions, 6 deletions
diff --git a/libdw/dwarf_getpubnames.c b/libdw/dwarf_getpubnames.c index 08b96cdc..91dad311 100644 --- a/libdw/dwarf_getpubnames.c +++ b/libdw/dwarf_getpubnames.c @@ -129,10 +129,13 @@ get_offsets (Dwarf *dbg) mem[cnt].cu_offset = read_8ubyte_unaligned (dbg, readp + 2); /* Determine the size of the CU header. */ - 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); + 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; + } 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 2f451d5d..ac9d2877 100644 --- a/libdw/dwarf_siblingof.c +++ b/libdw/dwarf_siblingof.c @@ -56,7 +56,6 @@ #include <dwarf.h> #include <string.h> - int dwarf_siblingof (die, result) Dwarf_Die *die; @@ -114,7 +113,6 @@ dwarf_siblingof (die, result) /* This abbreviation has children. */ ++level; - while (1) { /* Make sure we are still in range. Some producers might skip |