This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
PR22067, x86 check_relocs invalid read
- From: Alan Modra <amodra at gmail dot com>
- To: binutils at sourceware dot org
- Cc: "H.J. Lu" <hjl dot tools at gmail dot com>
- Date: Sun, 3 Sep 2017 22:14:11 +0930
- Subject: PR22067, x86 check_relocs invalid read
- Authentication-results: sourceware.org; auth=none
Committed as obvious.
PR 22067
* elfxx-x86.h (elf_x86_hash_table): Check is_elf_hash_table first.
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
--
Alan Modra
Australia Development Lab, IBM