blob: e8b87e28f96ad06603c8d26d15ca75a522f53851 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
From f32ba72991d2406b21ab17edc234a2f3fa7fb23d Mon Sep 17 00:00:00 2001
From: Nick Clifton <nickc@redhat.com>
Date: Mon, 3 Apr 2017 11:01:45 +0100
Subject: [PATCH] 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.
---
binutils/readelf.c | 6 +++---
2 files changed, 9 insertions(+), 3 deletions(-)
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;
--
2.9.3
|