diff options
Diffstat (limited to 'bfd/elf-strtab.c')
-rw-r--r-- | bfd/elf-strtab.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bfd/elf-strtab.c b/bfd/elf-strtab.c index 3e5e162..a3cb4ef 100644 --- a/bfd/elf-strtab.c +++ b/bfd/elf-strtab.c @@ -299,9 +299,11 @@ _bfd_elf_strtab_str (struct elf_strtab_hash *tab, size_t idx, bfd_size_type *offset) { if (idx == 0) - return 0; + return NULL; BFD_ASSERT (idx < tab->size); BFD_ASSERT (tab->sec_size); + if (tab->array[idx]->refcount == 0) + return NULL; if (offset) *offset = tab->array[idx]->u.index; return tab->array[idx]->root.string; |