From: Alan Modra <amodra@gmail.com>
To: binutils@sourceware.org
Subject: PR26623, buffer overflow in ppc_symbol_is_valid
Date: Wed, 16 Sep 2020 16:44:45 +0930 [thread overview]
Message-ID: <20200916071444.GL5452@bubble.grove.modra.org> (raw)
Synthetic symbols are not elf_symbol_type symbols.
PR 26623
* elf-bfd.h (elf_symbol_from): Exclude synthetic symbols.
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h
index eebdf9ac73..9b0a2028d3 100644
--- a/bfd/elf-bfd.h
+++ b/bfd/elf-bfd.h
@@ -792,7 +792,8 @@ struct elf_size_info {
};
#define elf_symbol_from(ABFD,S) \
- (((S)->the_bfd != NULL \
+ ((((S)->flags & BSF_SYNTHETIC) == 0 \
+ && (S)->the_bfd != NULL \
&& (S)->the_bfd->xvec->flavour == bfd_target_elf_flavour \
&& (S)->the_bfd->tdata.elf_obj_data != 0) \
? (elf_symbol_type *) (S) \
--
Alan Modra
Australia Development Lab, IBM
reply other threads:[~2020-09-16 7:14 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=20200916071444.GL5452@bubble.grove.modra.org \
--to=amodra@gmail.com \
--cc=binutils@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).