diff options
Diffstat (limited to 'bfd/elf.c')
-rw-r--r-- | bfd/elf.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -8918,7 +8918,9 @@ _bfd_elf_slurp_version_tables (bfd *abfd, bool default_imported_symver) bfd_set_error (bfd_error_file_too_big); goto error_return_verref; } - elf_tdata (abfd)->verref = (Elf_Internal_Verneed *) bfd_alloc (abfd, amt); + if (amt == 0) + goto error_return_verref; + elf_tdata (abfd)->verref = (Elf_Internal_Verneed *) bfd_zalloc (abfd, amt); if (elf_tdata (abfd)->verref == NULL) goto error_return_verref; |