From: Alan Modra <amodra@sourceware.org>
To: bfd-cvs@sourceware.org
Subject: [binutils-gdb] XCOFF sanity check
Date: Mon, 27 Mar 2023 11:29:15 +0000 (GMT) [thread overview]
Message-ID: <20230327112915.C81D83858CDA@sourceware.org> (raw)
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=58c4c6a0bf29525a029d64a6446ac5d9e0c45a4a
commit 58c4c6a0bf29525a029d64a6446ac5d9e0c45a4a
Author: Alan Modra <amodra@gmail.com>
Date: Sat Mar 25 09:43:40 2023 +1030
XCOFF sanity check
* coffcode.h (coff_pointerize_aux_hook): Sanity check
x_csect.x_scnlen against raw_syment_count.
Diff:
---
bfd/coffcode.h | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/bfd/coffcode.h b/bfd/coffcode.h
index 7a4c409a756..bf55d83530d 100644
--- a/bfd/coffcode.h
+++ b/bfd/coffcode.h
@@ -2462,7 +2462,8 @@ coff_pointerize_aux_hook (bfd *abfd ATTRIBUTE_UNUSED,
&& indaux + 1 == symbol->u.syment.n_numaux)
{
BFD_ASSERT (! aux->is_sym);
- if (SMTYP_SMTYP (aux->u.auxent.x_csect.x_smtyp) == XTY_LD)
+ if (SMTYP_SMTYP (aux->u.auxent.x_csect.x_smtyp) == XTY_LD
+ && (bfd_vma) aux->u.auxent.x_csect.x_scnlen.l < obj_raw_syment_count (abfd))
{
aux->u.auxent.x_csect.x_scnlen.p =
table_base + aux->u.auxent.x_csect.x_scnlen.l;
reply other threads:[~2023-03-27 11:29 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230327112915.C81D83858CDA@sourceware.org \
--to=amodra@sourceware.org \
--cc=bfd-cvs@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).