aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/binutils/binutils/CVE-2017-9747.patch
blob: ee663b816e1b58826d75e7a772a566530ca43b01 (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
commit 62b76e4b6e0b4cb5b3e0053d1de4097b32577049
Author: Nick Clifton <nickc@redhat.com>
Date:   Thu Jun 15 13:08:47 2017 +0100

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

Index: git/bfd/ieee.c
===================================================================
--- git.orig/bfd/ieee.c	2017-09-21 14:37:12.152903139 +0530
+++ git/bfd/ieee.c	2017-09-21 14:37:12.208903477 +0530
@@ -1353,7 +1353,7 @@
 {
   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	2017-09-21 14:37:12.152903139 +0530
+++ git/bfd/ChangeLog	2017-09-21 14:45:57.020150977 +0530
@@ -78,6 +78,8 @@
        PR binutils/21582
        * ieee.c (ieee_object_p): Use a static buffer to avoid compiler
        bugs.
+       PR binutils/21581
+       (ieee_archive_p): Likewise.
 
 2017-04-29  Alan Modra  <amodra@gmail.com>