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

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