]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
readelf: Update check for invalid word offsets in ARM unwind information.
authorNick Clifton <nickc@redhat.com>
Mon, 3 Apr 2017 10:01:45 +0000 (11:01 +0100)
committerNick Clifton <nickc@redhat.com>
Mon, 3 Apr 2017 10:01:45 +0000 (11:01 +0100)
PR binutils/21343
* readelf.c (get_unwind_section_word): Fix snafu checking for
invalid word offsets in ARM unwind information.

binutils/ChangeLog
binutils/readelf.c

index eb836119e710ed7bede85d905536b33640bdad0d..dee35e5f381a03e7254d086b518d4f7f5f723f06 100644 (file)
@@ -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.
index 31a519bc1805114367d21e98dd1c2ef1ecad850d..47736d6e9342cefd701eff15d37b5ceedca0d944 100644 (file)
@@ -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;