aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/binutils/binutils/CVE-2017-9748.patch
blob: ea1f0dd62b02d974fad9c3bc13ff9da057a2b049 (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
commit 63634bb4a107877dd08b6282e28e11cfd1a1649e
Author: Nick Clifton <nickc@redhat.com>
Date:   Thu Jun 15 12:44:23 2017 +0100

    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: Thiruvadi Rajaraman <trajaraman@mvista.com>

Index: git/bfd/ieee.c
===================================================================
--- git.orig/bfd/ieee.c	2017-09-21 13:53:50.891154141 +0530
+++ git/bfd/ieee.c	2017-09-21 13:54:00.715232229 +0530
@@ -1871,7 +1871,7 @@
   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	2017-09-21 13:54:00.483230385 +0530
+++ git/bfd/ChangeLog	2017-09-21 13:57:44.885008549 +0530
@@ -73,6 +73,12 @@
        (evax_bfd_print_egsd): Check for an overlarge record length.
        (evax_bfd_print_etir): Likewise.
 
+2017-06-15  Nick Clifton  <nickc@redhat.com>
+
+       PR binutils/21582
+       * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
+       bugs.
+
 2017-04-29  Alan Modra  <amodra@gmail.com>
 
        PR 21432