diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2011-09-18 16:50:17 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2011-09-18 16:50:17 +0000 |
commit | b3681d67e43b07454eeb8b23030ea84012929ac9 (patch) | |
tree | 16717d880e5d0d1d35f89b486f338fc56011fa9c /binutils/dwarf.c | |
parent | aa06ae28f116b4f99f0e3cb158e8542adfb65697 (diff) | |
download | gdb-b3681d67e43b07454eeb8b23030ea84012929ac9.zip gdb-b3681d67e43b07454eeb8b23030ea84012929ac9.tar.gz gdb-b3681d67e43b07454eeb8b23030ea84012929ac9.tar.bz2 |
Check zero address size.
2011-09-18 H.J. Lu <hongjiu.lu@intel.com>
PR binutils/13196
* dwarf.c (display_debug_aranges): Check zero address size.
Diffstat (limited to 'binutils/dwarf.c')
-rw-r--r-- | binutils/dwarf.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/binutils/dwarf.c b/binutils/dwarf.c index 776f775..1ee0e33 100644 --- a/binutils/dwarf.c +++ b/binutils/dwarf.c @@ -4215,6 +4215,13 @@ display_debug_aranges (struct dwarf_section *section, address_size = arange.ar_pointer_size + arange.ar_segment_size; + if (address_size == 0) + { + error (_("Invalid address size in %s section!\n"), + section->name); + break; + } + /* The DWARF spec does not require that the address size be a power of two, but we do. This will have to change if we ever encounter an uneven architecture. */ |