Prevent NULL pointer dereference.
This commit is contained in:
parent
e40eccb4fb
commit
b32b5d6e64
|
@ -1,3 +1,8 @@
|
|||
2001-03-21 Alan Modra <alan@linuxcare.com.au>
|
||||
|
||||
* elf32-hppa.c (elf32_hppa_set_gp): Check sec->output_section
|
||||
non-NULL before attempting to dereference.
|
||||
|
||||
2001-03-20 H.J. Lu <hjl@gnu.org>
|
||||
|
||||
* configure.in: Remove the redundent AC_ARG_PROGRAM.
|
||||
|
|
|
@ -3089,7 +3089,7 @@ elf32_hppa_set_gp (abfd, info)
|
|||
}
|
||||
}
|
||||
|
||||
if (sec != NULL)
|
||||
if (sec != NULL && sec->output_section != NULL)
|
||||
gp_val += sec->output_section->vma + sec->output_offset;
|
||||
|
||||
elf_gp (abfd) = gp_val;
|
||||
|
|
Loading…
Reference in New Issue