aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/binutils/binutils/CVE-2017-9747.patch
blob: 41ead54a987dd7b4681f4fb9ed51178baa55c37e (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
34
35
36
37
38
39
40
41
42
43
From 62b76e4b6e0b4cb5b3e0053d1de4097b32577049 Mon Sep 17 00:00:00 2001
From: Nick Clifton <nickc@redhat.com>
Date: Thu, 15 Jun 2017 13:08:47 +0100
Subject: [PATCH] Fix address violation parsing a corrupt ieee binary.

	PR binutils/21581
	(ieee_archive_p): Use a static buffer to avoid compiler bugs.

Upstream-Status: Backport
CVE: CVE-2017-9747
Signed-off-by: Armin Kuster <akuster@mvista.com>

---
 bfd/ChangeLog | 2 ++
 bfd/ieee.c    | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)

Index: git/bfd/ieee.c
===================================================================
--- git.orig/bfd/ieee.c
+++ git/bfd/ieee.c
@@ -1357,7 +1357,7 @@ ieee_archive_p (bfd *abfd)
 {
   char *library;
   unsigned int i;
-  unsigned char buffer[512];
+  static unsigned char buffer[512];
   file_ptr buffer_offset = 0;
   ieee_ar_data_type *save = abfd->tdata.ieee_ar_data;
   ieee_ar_data_type *ieee;
Index: git/bfd/ChangeLog
===================================================================
--- git.orig/bfd/ChangeLog
+++ git/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2017-06-15  Nick Clifton  <nickc@redhat.com>
+
+       PR binutils/21581
+       (ieee_archive_p): Likewise.
+
 2017-06-14  Nick Clifton  <nickc@redhat.com>
  
        PR binutils/21578