summaryrefslogtreecommitdiff
path: root/bfd/elf32-i386.c
diff options
context:
space:
mode:
authorMichael Snyder <msnyder@vmware.com>2007-07-27 18:50:18 +0000
committerMichael Snyder <msnyder@vmware.com>2007-07-27 18:50:18 +0000
commit3871ee7d130a3baf86f84c9315338b431dee55a3 (patch)
treeca5ce6904263b645a0c1fdf6204eea8c2edca1d5 /bfd/elf32-i386.c
parent05aceca5b496be7b244e66cdd9cc394dae3405e7 (diff)
downloadbinutils-redhat-3871ee7d130a3baf86f84c9315338b431dee55a3.tar.gz
2007-07-27 Michael Snyder <msnyder@access-company.com>
* elf32-i386.c (elf_i386_check_relocs): Check for null pointer.
Diffstat (limited to 'bfd/elf32-i386.c')
-rw-r--r--bfd/elf32-i386.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/bfd/elf32-i386.c b/bfd/elf32-i386.c
index abac6b2d10..c50e98d92b 100644
--- a/bfd/elf32-i386.c
+++ b/bfd/elf32-i386.c
@@ -1270,14 +1270,18 @@ elf_i386_check_relocs (bfd *abfd,
/* This relocation describes the C++ object vtable hierarchy.
Reconstruct it for later use during GC. */
case R_386_GNU_VTINHERIT:
- if (!bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset))
+ BFD_ASSERT (h != NULL);
+ if (h != NULL
+ && !bfd_elf_gc_record_vtinherit (abfd, sec, h, rel->r_offset))
return FALSE;
break;
/* This relocation describes which C++ vtable entries are actually
used. Record for later use during GC. */
case R_386_GNU_VTENTRY:
- if (!bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_offset))
+ BFD_ASSERT (h != NULL);
+ if (h != NULL
+ && !bfd_elf_gc_record_vtentry (abfd, sec, h, rel->r_offset))
return FALSE;
break;