diff options
author | Tom Tromey <tromey@adacore.com> | 2024-08-21 09:09:26 -0600 |
---|---|---|
committer | Tom Tromey <tromey@adacore.com> | 2024-08-21 10:33:46 -0600 |
commit | 5d683ae3dadd78fa88c243310404480555555246 (patch) | |
tree | 3ae456bbf1d7994a74ae3b95836e8974d0c140dd /gdb/buildsym.c | |
parent | 28c3bf55f0f9aca8619c6d01be34a02a887c5577 (diff) | |
download | gdb-5d683ae3dadd78fa88c243310404480555555246.zip gdb-5d683ae3dadd78fa88c243310404480555555246.tar.gz gdb-5d683ae3dadd78fa88c243310404480555555246.tar.bz2 |
Do not assume ELF in dwarf2/read.c
dwarf2/read.c has this code:
else if (elf_section_data (sectp)->this_hdr.sh_size
> bfd_get_file_size (abfd))
This assumes that the BFD is an ELF, which is an invalid assumption.
A user noticed that this can sometimes cause a crash.
This patch fixes the problem by changing this code to use
bfd_section_size_insane.
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=32104
Reviewed-By: Tom de Vries <tdevries@suse.de>
Reviewed-by: Keith Seitz <keiths@redhat.com>
Diffstat (limited to 'gdb/buildsym.c')
0 files changed, 0 insertions, 0 deletions