aboutsummaryrefslogtreecommitdiff
path: root/bfd/bfd.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2004-04-15 08:48:56 +0000
committerNick Clifton <nickc@redhat.com>2004-04-15 08:48:56 +0000
commit3d1bca9dfbd506fabf2258a5f0a42a03cfcdbb45 (patch)
treea9d2dda2028cc1ace58fafd7bc2617a2e89b976a /bfd/bfd.c
parent019b892f3402c74ff53e051083844e7cbd82156f (diff)
downloadgdb-3d1bca9dfbd506fabf2258a5f0a42a03cfcdbb45.zip
gdb-3d1bca9dfbd506fabf2258a5f0a42a03cfcdbb45.tar.gz
gdb-3d1bca9dfbd506fabf2258a5f0a42a03cfcdbb45.tar.bz2
Catch NULL bfd pointers passed to bfd_archive_filename
Diffstat (limited to 'bfd/bfd.c')
-rw-r--r--bfd/bfd.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/bfd/bfd.c b/bfd/bfd.c
index d37a48b..59e22aa 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 _("<unknown>");
+
if (abfd->my_archive)
{
static size_t curr = 0;