]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
Fix: nm: SEGV on unknow address at nm.c:718 in print_symname
authorNick Clifton <nickc@redhat.com>
Thu, 28 Sep 2023 11:37:59 +0000 (12:37 +0100)
committerNick Clifton <nickc@redhat.com>
Thu, 28 Sep 2023 11:37:59 +0000 (12:37 +0100)
commit6136093c0d009e3118abb08344e156d91144a046
tree507244e1ffcb13fcb1b44c3a3bdeac2fa73347d6
parent2654f77d1424f6172d3026c524e96e14b5752ba1
Fix: nm: SEGV on unknow address at nm.c:718 in print_symname

  PR 30886 * elf-bfd.h (struct elf_obj_tdata): Add dt_strsz field.
  * elf.c (_bfd_elf_get_dynamic_symbols): Add a NUL byte at the end of the string table. Initialise the dt_strsz field. (_bfd_elf_slurp_version_tables): Only free the contents if they were malloc'ed. Add checks before setting string pointers in the dt_strtab buffer.
bfd/ChangeLog
bfd/elf-bfd.h
bfd/elf.c