From: Alan Modra Date: Tue, 15 Sep 2020 23:52:36 +0000 (+0930) Subject: PR26623, buffer overflow in ppc_symbol_is_valid X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ec74481d7e4afbc89e3785d22659d3897af36956;p=binutils-gdb.git PR26623, buffer overflow in ppc_symbol_is_valid PR 26623 * elf-bfd.h (elf_symbol_from): Exclude synthetic symbols. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index cc5afb42d43..09e4a5fdd4e 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2020-09-16 Alan Modra + + PR 26623 + * elf-bfd.h (elf_symbol_from): Exclude synthetic symbols. + 2020-09-15 H.J. Lu * coff-x86_64.c (howto_table): Display PE relocation names. diff --git a/bfd/elf-bfd.h b/bfd/elf-bfd.h index eebdf9ac738..9b0a2028d35 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) \