aboutsummaryrefslogtreecommitdiff
path: root/bfd/bfd.c
diff options
context:
space:
mode:
authorThiemo Seufer <ths@networkno.de>2003-05-17 00:41:45 +0000
committerThiemo Seufer <ths@networkno.de>2003-05-17 00:41:45 +0000
commit9bcf4de0ded2d7a6eeddd3523756ea2bee8b8fb4 (patch)
treee56281b1276482e26ec3f229a167480ac324fcfe /bfd/bfd.c
parentc580a372630fd320ca08bdff5cb568874e3b8e06 (diff)
downloadgdb-9bcf4de0ded2d7a6eeddd3523756ea2bee8b8fb4.zip
gdb-9bcf4de0ded2d7a6eeddd3523756ea2bee8b8fb4.tar.gz
gdb-9bcf4de0ded2d7a6eeddd3523756ea2bee8b8fb4.tar.bz2
* bfd.c (_bfd_get_gp_value): Prevent illegal access for abfd null
pointers. (_bfd_set_gp_value): Likewise.
Diffstat (limited to 'bfd/bfd.c')
-rw-r--r--bfd/bfd.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/bfd/bfd.c b/bfd/bfd.c
index 3225082..99c5ea6 100644
--- a/bfd/bfd.c
+++ b/bfd/bfd.c
@@ -894,6 +894,8 @@ bfd_vma
_bfd_get_gp_value (abfd)
bfd *abfd;
{
+ if (! abfd)
+ return 0;
if (abfd->format != bfd_object)
return 0;
@@ -912,6 +914,8 @@ _bfd_set_gp_value (abfd, v)
bfd *abfd;
bfd_vma v;
{
+ if (! abfd)
+ BFD_FAIL ();
if (abfd->format != bfd_object)
return;