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

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