Blame SOURCES/binutils-CVE-2019-12972.patch

0c74e2
--- binutils.orig/bfd/elfcode.h	2020-05-13 11:18:04.792779506 +0100
0c74e2
+++ binutils-2.32/bfd/elfcode.h	2020-05-13 11:19:36.270101134 +0100
0c74e2
@@ -750,12 +750,9 @@ elf_object_p (bfd *abfd)
0c74e2
 		  != 0))
0c74e2
 	    abfd->flags &= ~D_PAGED;
0c74e2
 	}
0c74e2
-    }
0c74e2
 
0c74e2
-  /* A further sanity check.  */
0c74e2
-  if (i_ehdrp->e_shnum != 0)
0c74e2
-    {
0c74e2
-      if (i_ehdrp->e_shstrndx >= elf_numsections (abfd))
0c74e2
+      if (i_ehdrp->e_shstrndx >= elf_numsections (abfd)
0c74e2
+         || i_shdrp[i_ehdrp->e_shstrndx].sh_type != SHT_STRTAB)
0c74e2
 	{
0c74e2
 	  /* PR 2257:
0c74e2
 	     We used to just goto got_wrong_format_error here