From: Nick Clifton Date: Thu, 15 Apr 2004 08:48:56 +0000 (+0000) Subject: Catch NULL bfd pointers passed to bfd_archive_filename X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3d1bca9dfbd506fabf2258a5f0a42a03cfcdbb45;p=binutils-gdb.git Catch NULL bfd pointers passed to bfd_archive_filename --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 4c4a5417c46..5bd1d745215 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,7 @@ +2004-04-15 Nick Clifton + + * bfd.c (bfd_archive_filename): Catch NULL bfd pointers. + 2004-04-15 Alan Modra * elf64-sparc.c (sparc64_elf_check_relocs): Fix thinko last change. diff --git a/bfd/bfd.c b/bfd/bfd.c index d37a48bc23b..59e22aaed8d 100644 --- a/bfd/bfd.c +++ b/bfd/bfd.c @@ -512,6 +512,9 @@ DESCRIPTION const char * bfd_archive_filename (bfd *abfd) { + if (abfd == NULL) + return _(""); + if (abfd->my_archive) { static size_t curr = 0;