* bfd.c (_bfd_get_gp_value): Prevent illegal access for abfd null

pointers.
	(_bfd_set_gp_value): Likewise.
This commit is contained in:
Thiemo Seufer 2003-05-17 00:41:45 +00:00
parent c580a37263
commit 9bcf4de0de
2 changed files with 10 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2003-05-17 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
* bfd.c (_bfd_get_gp_value): Prevent illegal access for abfd null
pointers.
(_bfd_set_gp_value): Likewise.
2003-05-16 Michael Snyder <msnyder@redhat.com>
From Bernd Schmidt <bernds@redhat.com>
* archures.c (bfd_mach_h8300sx): New.

View File

@ -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;