aboutsummaryrefslogtreecommitdiff
path: root/binutils
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2017-04-03 11:01:45 +0100
committerNick Clifton <nickc@redhat.com>2017-04-03 11:01:45 +0100
commitf32ba72991d2406b21ab17edc234a2f3fa7fb23d (patch)
tree2c06bd2a0d6a35f01e8e41abde4bb8d309d391c1 /binutils
parent12bfb8fec326e847f6300874ca656e47ee027f5d (diff)
downloadgdb-f32ba72991d2406b21ab17edc234a2f3fa7fb23d.zip
gdb-f32ba72991d2406b21ab17edc234a2f3fa7fb23d.tar.gz
gdb-f32ba72991d2406b21ab17edc234a2f3fa7fb23d.tar.bz2
readelf: Update check for invalid word offsets in ARM unwind information.
PR binutils/21343 * readelf.c (get_unwind_section_word): Fix snafu checking for invalid word offsets in ARM unwind information.
Diffstat (limited to 'binutils')
-rw-r--r--binutils/ChangeLog6
-rw-r--r--binutils/readelf.c6
2 files changed, 9 insertions, 3 deletions
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index eb83611..dee35e5 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,9 @@
+2017-04-03 Nick Clifton <nickc@redhat.com>
+
+ PR binutils/21343
+ * readelf.c (get_unwind_section_word): Fix snafu checking for
+ invalid word offsets in ARM unwind information.
+
2017-03-31 Pip Cet <pipcet@gmail.com>
* NEWS: Use "WebAssembly" consistently.
diff --git a/binutils/readelf.c b/binutils/readelf.c
index 31a519b..47736d6 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -8053,9 +8053,9 @@ get_unwind_section_word (struct arm_unw_aux_info * aux,
return FALSE;
/* If the offset is invalid then fail. */
- if (word_offset > (sec->sh_size - 4)
- /* PR 18879 */
- || (sec->sh_size < 5 && word_offset >= sec->sh_size)
+ if (/* PR 21343 *//* PR 18879 */
+ sec->sh_size < 4
+ || word_offset > (sec->sh_size - 4)
|| ((bfd_signed_vma) word_offset) < 0)
return FALSE;