Blame SOURCES/binutils-CVE-2018-10535.patch

6cffa7
--- binutils.orig/bfd/elf.c	2018-05-17 11:46:03.983280175 +0100
6cffa7
+++ binutils-2.27/bfd/elf.c	2018-05-17 11:48:01.560955253 +0100
6cffa7
@@ -3878,16 +3878,23 @@ ignore_section_sym (bfd *abfd, asymbol *
6cffa7
 {
6cffa7
   elf_symbol_type *type_ptr;
6cffa7
 
6cffa7
+  if (sym == NULL)
6cffa7
+    return FALSE;
6cffa7
+
6cffa7
   if ((sym->flags & BSF_SECTION_SYM) == 0)
6cffa7
     return FALSE;
6cffa7
 
6cffa7
+  if (sym->section == NULL)
6cffa7
+    return TRUE;
6cffa7
+
6cffa7
   type_ptr = elf_symbol_from (abfd, sym);
6cffa7
   return ((type_ptr != NULL
6cffa7
 	   && type_ptr->internal_elf_sym.st_shndx != 0
6cffa7
 	   && bfd_is_abs_section (sym->section))
6cffa7
 	  || !(sym->section->owner == abfd
6cffa7
-	       || (sym->section->output_section->owner == abfd
6cffa7
-		   && sym->section->output_offset == 0)
6cffa7
+              || (sym->section->output_section != NULL
6cffa7
+                  && sym->section->output_section->owner == abfd
6cffa7
+		  && sym->section->output_offset == 0)
6cffa7
 	       || bfd_is_abs_section (sym->section)));
6cffa7
 }
6cffa7