aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-devtools/binutils/binutils/CVE-2017-9955_3.patch
blob: c8741b13cacd63f8d4262a047f977cd34a198a8d (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
commit 1f473e3d0ad285195934e6a077c7ed32afe66437
Author: H.J. Lu <hjl.tools@gmail.com>
Date:   Mon Jun 26 15:47:16 2017 -0700

    Add a missing line to _bfd_generic_get_section_contents_in_window
    
    	PR binutils/21665
    	* libbfd.c (_bfd_generic_get_section_contents_in_window): Add
    	a missing line.

Upstream-Status: Backport

CVE: CVE-2017-9955
Signed-off-by: Thiruvadi Rajaraman <trajaraman@mvista.com>

Index: git/bfd/libbfd.c
===================================================================
--- git.orig/bfd/libbfd.c	2017-09-21 17:57:11.424955516 +0530
+++ git/bfd/libbfd.c	2017-09-21 17:58:57.000000000 +0530
@@ -867,6 +867,7 @@
   else
     sz = section->size;
   filesz = bfd_get_file_size (abfd);
+  if (filesz < 0)
     {
       /* This should never happen.  */
       abort ();
Index: git/bfd/ChangeLog
===================================================================
--- git.orig/bfd/ChangeLog	2017-09-21 17:57:11.424955516 +0530
+++ git/bfd/ChangeLog	2017-09-21 18:01:32.258884464 +0530
@@ -14,6 +14,12 @@
 2017-06-26  H.J. Lu  <hongjiu.lu@intel.com>
 
        PR binutils/21665
+       * libbfd.c (_bfd_generic_get_section_contents_in_window): Add
+       a missing line.
+
+2017-06-26  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR binutils/21665
        * compress.c (bfd_get_full_section_contents): Don't check the
        file size here.
        * libbfd.c (_bfd_generic_get_section_contents): Check for and