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
