Blame SOURCES/binutils-CVE-2022-4285.patch

edd3b6
--- binutils.orig/bfd/elf.c	2022-12-13 15:21:20.040233487 +0000
edd3b6
+++ binutils-2.39/bfd/elf.c	2022-12-13 15:22:33.580986232 +0000
edd3b6
@@ -8868,7 +8868,9 @@ _bfd_elf_slurp_version_tables (bfd *abfd
edd3b6
 	  bfd_set_error (bfd_error_file_too_big);
edd3b6
 	  goto error_return_verref;
edd3b6
 	}
edd3b6
-      elf_tdata (abfd)->verref = (Elf_Internal_Verneed *) bfd_alloc (abfd, amt);
edd3b6
+      if (amt == 0)
edd3b6
+       goto error_return_verref;
edd3b6
+      elf_tdata (abfd)->verref = (Elf_Internal_Verneed *) bfd_zalloc (abfd, amt);
edd3b6
       if (elf_tdata (abfd)->verref == NULL)
edd3b6
 	goto error_return_verref;
edd3b6