Skip to content
Commit 5d683ae3 authored by Tom Tromey's avatar Tom Tromey
Browse files

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: default avatarTom de Vries <tdevries@suse.de>
Reviewed-by: default avatarKeith Seitz <keiths@redhat.com>
parent 28c3bf55
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment