[binutils-gdb] PR22067, x86 check_relocs invalid read
Alan Modra
amodra@sourceware.org
Sun Sep 3 12:41:00 GMT 2017
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=1cf58434bf9d90ea0669f97514c63dc1ccf38f7c
commit 1cf58434bf9d90ea0669f97514c63dc1ccf38f7c
Author: Alan Modra <amodra@gmail.com>
Date: Sun Sep 3 22:04:09 2017 +0930
PR22067, x86 check_relocs invalid read
PR 22067
* elfxx-x86.h (elf_x86_hash_table): Check is_elf_hash_table first.
Diff:
---
bfd/ChangeLog | 5 +++++
bfd/elfxx-x86.h | 3 ++-
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 4190878..958b89d 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2017-09-03 Alan Modra <amodra@gmail.com>
+
+ PR 22067
+ * elfxx-x86.h (elf_x86_hash_table): Check is_elf_hash_table first.
+
2017-09-02 H.J. Lu <hongjiu.lu@intel.com>
* elfxx-x86.c (_bfd_x86_elf_link_hash_table_create): Initialize
diff --git a/bfd/elfxx-x86.h b/bfd/elfxx-x86.h
index 61244f5..9c0dcbbe 100644
--- a/bfd/elfxx-x86.h
+++ b/bfd/elfxx-x86.h
@@ -41,7 +41,8 @@
#define ELIMINATE_COPY_RELOCS 1
#define elf_x86_hash_table(p, id) \
- (elf_hash_table_id ((struct elf_link_hash_table *) ((p)->hash)) == (id) \
+ (is_elf_hash_table ((p)->hash) \
+ && elf_hash_table_id ((struct elf_link_hash_table *) ((p)->hash)) == (id) \
? ((struct elf_x86_link_hash_table *) ((p)->hash)) : NULL)
/* Is a undefined weak symbol which is resolved to 0. Reference to an
More information about the Binutils-cvs
mailing list