aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2015-03-24 17:20:00 +0000
committerNick Clifton <nickc@redhat.com>2015-03-24 17:20:00 +0000
commitfc42baf3cdc41bc8cf12e35ae78e4529c1470118 (patch)
tree9763efffb91aa0cdbba78e40c792eaf213113b51
parentfc6d53be1893813f5017681a211dd20d560d8c58 (diff)
downloadgdb-fc42baf3cdc41bc8cf12e35ae78e4529c1470118.zip
gdb-fc42baf3cdc41bc8cf12e35ae78e4529c1470118.tar.gz
gdb-fc42baf3cdc41bc8cf12e35ae78e4529c1470118.tar.bz2
Fixes a bug introduced by the new ranges checks on COFF symbol tables.
PR binutils/17512 * coffgen.c (coff_get_normalized_symtab): Fix test for out of range auxillary sections.
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/coffgen.c3
2 files changed, 7 insertions, 2 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index aad0763..73c155c 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,9 @@
+2015-03-24 Nick Clifton <nickc@redhat.com>
+
+ PR binutils/17512
+ * coffgen.c (coff_get_normalized_symtab): Fix test for out of
+ range auxillary sections.
+
2015-03-24 Marcus Shawcroft <marcus.shawcroft@arm.com>
* elfnn-aarch64.c (_bfd_aarch64_create_or_find_stub_sec): Factor
diff --git a/bfd/coffgen.c b/bfd/coffgen.c
index b1ab56e..2cd7b09 100644
--- a/bfd/coffgen.c
+++ b/bfd/coffgen.c
@@ -1808,7 +1808,7 @@ coff_get_normalized_symtab (bfd *abfd)
if (symbol_ptr->u.syment.n_sclass == C_FILE
&& symbol_ptr->u.syment.n_numaux > 0
&& raw_src + symesz + symbol_ptr->u.syment.n_numaux
- * sizeof (union internal_auxent) >= raw_end)
+ * symesz > raw_end)
{
bfd_release (abfd, internal);
return NULL;
@@ -1827,7 +1827,6 @@ coff_get_normalized_symtab (bfd *abfd)
}
raw_src += symesz;
-
bfd_coff_swap_aux_in (abfd, (void *) raw_src,
symbol_ptr->u.syment.n_type,
symbol_ptr->u.syment.n_sclass,