diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2011-09-18 16:50:16 +0000 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2011-09-18 16:50:16 +0000 |
commit | f61f1d0c090bb7996bee0d9d4c9c8d77015a644c (patch) | |
tree | 60de62ea7f1bbf5302a0442dfc85b447b26dc122 /binutils | |
parent | f18dd8fbf4fd49102e983ed4fdf1e7fc11d5d359 (diff) | |
download | binutils-redhat-f61f1d0c090bb7996bee0d9d4c9c8d77015a644c.tar.gz |
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')
-rw-r--r-- | binutils/ChangeLog | 5 | ||||
-rw-r--r-- | binutils/dwarf.c | 7 |
2 files changed, 12 insertions, 0 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog index 144dbffafc..8af899b8d1 100644 --- a/binutils/ChangeLog +++ b/binutils/ChangeLog @@ -1,3 +1,8 @@ +2011-09-18 H.J. Lu <hongjiu.lu@intel.com> + + PR binutils/13196 + * dwarf.c (display_debug_aranges): Check zero address size. + 2011-09-15 H.J. Lu <hongjiu.lu@intel.com> PR binutils/13180 diff --git a/binutils/dwarf.c b/binutils/dwarf.c index 776f775421..1ee0e336c1 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. */ |