diff options
author | Alan Modra <amodra@gmail.com> | 2020-09-16 09:22:36 +0930 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2020-09-16 16:41:32 +0930 |
commit | ec74481d7e4afbc89e3785d22659d3897af36956 (patch) | |
tree | 8af4023515ccf78fca48a65a314376df05c711ab /bfd/elf-bfd.h | |
parent | 12d8f940d0c09e808f56a898fe5936b2b8f0403c (diff) | |
download | gdb-ec74481d7e4afbc89e3785d22659d3897af36956.zip gdb-ec74481d7e4afbc89e3785d22659d3897af36956.tar.gz gdb-ec74481d7e4afbc89e3785d22659d3897af36956.tar.bz2 |
PR26623, buffer overflow in ppc_symbol_is_valid
PR 26623
* elf-bfd.h (elf_symbol_from): Exclude synthetic symbols.
Diffstat (limited to 'bfd/elf-bfd.h')
-rw-r--r-- | bfd/elf-bfd.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h index eebdf9a..9b0a202 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) \ |