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

381f6c
--- binutils.orig/bfd/elf.c	2018-05-10 10:09:03.622147305 +0100
381f6c
+++ binutils-2.30/bfd/elf.c	2018-05-10 10:29:09.895577234 +0100
381f6c
@@ -4021,16 +4021,23 @@ ignore_section_sym (bfd *abfd, asymbol *
381f6c
 {
381f6c
   elf_symbol_type *type_ptr;
381f6c
 
381f6c
+  if (sym == NULL)
381f6c
+    return FALSE;
381f6c
+
381f6c
   if ((sym->flags & BSF_SECTION_SYM) == 0)
381f6c
     return FALSE;
381f6c
 
381f6c
+  if (sym->section == NULL)
381f6c
+    return TRUE;
381f6c
+
381f6c
   type_ptr = elf_symbol_from (abfd, sym);
381f6c
   return ((type_ptr != NULL
381f6c
 	   && type_ptr->internal_elf_sym.st_shndx != 0
381f6c
 	   && bfd_is_abs_section (sym->section))
381f6c
 	  || !(sym->section->owner == abfd
381f6c
-	       || (sym->section->output_section->owner == abfd
381f6c
-		   && sym->section->output_offset == 0)
381f6c
+              || (sym->section->output_section != NULL
381f6c
+                  && sym->section->output_section->owner == abfd
381f6c
+		  && sym->section->output_offset == 0)
381f6c
 	       || bfd_is_abs_section (sym->section)));
381f6c
 }
381f6c