diff options
author | Alan Modra <amodra@gmail.com> | 2021-10-30 19:19:13 +1030 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2021-10-31 11:42:08 +1030 |
commit | 1c5e9d8d8cfdc4528ec4713dc6001e8b66c28134 (patch) | |
tree | aad2214411f7afa795b1b61c7d1270903679ef68 | |
parent | 9216910ed82b2b64ced4b2031730f6a659c2034c (diff) | |
download | gdb-1c5e9d8d8cfdc4528ec4713dc6001e8b66c28134.zip gdb-1c5e9d8d8cfdc4528ec4713dc6001e8b66c28134.tar.gz gdb-1c5e9d8d8cfdc4528ec4713dc6001e8b66c28134.tar.bz2 |
Re: PR28420, ecoff fuzzing failures
sym_ptr_ptr NULL results in segfaults.
PR 28420
* ecoff.c (ecoff_slurp_reloc_table): Don't leave sym_ptr_ptr NULL.
-rw-r--r-- | bfd/ecoff.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/bfd/ecoff.c b/bfd/ecoff.c index 7539fad..c660af1 100644 --- a/bfd/ecoff.c +++ b/bfd/ecoff.c @@ -1606,7 +1606,7 @@ ecoff_slurp_reloc_table (bfd *abfd, (*backend->swap_reloc_in) (abfd, external_relocs + i * external_reloc_size, &intern); - rptr->sym_ptr_ptr = NULL; + rptr->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr; rptr->addend = 0; if (intern.r_extern) @@ -1617,9 +1617,6 @@ ecoff_slurp_reloc_table (bfd *abfd, < (ecoff_data (abfd)->debug_info.symbolic_header.iextMax))) rptr->sym_ptr_ptr = symbols + intern.r_symndx; } - else if (intern.r_symndx == RELOC_SECTION_NONE - || intern.r_symndx == RELOC_SECTION_ABS) - rptr->sym_ptr_ptr = bfd_abs_section_ptr->symbol_ptr_ptr; else { const char *sec_name; |