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

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