asan: uninit write _bfd_ecoff_write_object_contents
authorAlan Modra <amodra@gmail.com>
Thu, 2 Jun 2022 07:13:48 +0000 (16:43 +0930)
committerAlan Modra <amodra@gmail.com>
Thu, 2 Jun 2022 07:13:48 +0000 (16:43 +0930)
* ecoff.c (_bfd_ecoff_write_object_contents): zalloc reloc_buff.

bfd/ecoff.c

index d2081055835613eecaa3638318abc60cfee37650..511d88b533929e68670be3a5dbf5df9ff0cabc9d 100644 (file)
@@ -2632,7 +2632,7 @@ _bfd_ecoff_write_object_contents (bfd *abfd)
            continue;
 
          amt = current->reloc_count * external_reloc_size;
-         reloc_buff = bfd_alloc (abfd, amt);
+         reloc_buff = bfd_zalloc (abfd, amt);
          if (reloc_buff == NULL)
            goto error_return;