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

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