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

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