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

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