summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2017-04-03 11:01:45 +0100
committerSangmin Seo <sangmin7.seo@samsung.com>2017-06-23 19:49:22 +0900
commit5f14806086e7136b1c32a9edb986205d8a2e50a3 (patch)
tree999586af618c3a7bee36d42ae5096d51924f9894
parent93a38e317f8f0889744a7736c12a969785f66d34 (diff)
downloadbinutils-5f14806086e7136b1c32a9edb986205d8a2e50a3.tar.gz
binutils-5f14806086e7136b1c32a9edb986205d8a2e50a3.tar.bz2
binutils-5f14806086e7136b1c32a9edb986205d8a2e50a3.zip
readelf: Update check for invalid word offsets in ARM unwind information.submit/tizen_base/20170705.023439submit/tizen_base/20170630.042341accepted/tizen/base/20170707.183609
PR binutils/21343 * readelf.c (get_unwind_section_word): Fix snafu checking for invalid word offsets in ARM unwind information. Cherry-picked f32ba72991d2406b21ab17edc234a2f3fa7fb23d Change-Id: I8e0b7cb2447d915a7d084f91d7dadd6756f9f843 Signed-off-by: Sangmin Seo <sangmin7.seo@samsung.com>
-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 b92bf4657a2..edfdc02d399 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.
+
2016-08-03 Tristan Gingold <gingold@adacore.com>
* configure: Regenerate.
diff --git a/binutils/readelf.c b/binutils/readelf.c
index 274ddd17266..9a515ff7936 100644
--- a/binutils/readelf.c
+++ b/binutils/readelf.c
@@ -7738,9 +7738,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;