aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/binutils/binutils/CVE-2017-9748.patch
blob: 02070235a8914f33f285263ef8f63aab9305a1ac (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
44
45
46
From 63634bb4a107877dd08b6282e28e11cfd1a1649e Mon Sep 17 00:00:00 2001
From: Nick Clifton <nickc@redhat.com>
Date: Thu, 15 Jun 2017 12:44:23 +0100
Subject: [PATCH] Avoid a possible compiler bug by using a static buffer
 instead of a stack local buffer.

	PR binutils/21582
	* ieee.c (ieee_object_p): Use a static buffer to avoid compiler
	bugs.

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

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

Index: git/bfd/ieee.c
===================================================================
--- git.orig/bfd/ieee.c
+++ git/bfd/ieee.c
@@ -1875,7 +1875,7 @@ ieee_object_p (bfd *abfd)
   char *processor;
   unsigned int part;
   ieee_data_type *ieee;
-  unsigned char buffer[300];
+  static unsigned char buffer[300];
   ieee_data_type *save = IEEE_DATA (abfd);
   bfd_size_type amt;
 
Index: git/bfd/ChangeLog
===================================================================
--- git.orig/bfd/ChangeLog
+++ git/bfd/ChangeLog
@@ -1,5 +1,9 @@
 2017-06-15  Nick Clifton  <nickc@redhat.com>
 
+       PR binutils/21582
+       * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
+       bugs.
+
        PR binutils/21581
        (ieee_archive_p): Likewise.