aboutsummaryrefslogtreecommitdiff
path: root/bfd/dwarf2.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2019-03-06 09:43:15 +0000
committerNick Clifton <nickc@redhat.com>2019-03-06 09:43:54 +0000
commit219d6836e939d2cd1a8c5574bfa3a101daa31cbb (patch)
treefcb558dbeef3a07afaa31f7b5ea54561d7e37e3c /bfd/dwarf2.c
parentaa3cfbda2f2af71044949b5692ce51cafb023d13 (diff)
downloadgdb-219d6836e939d2cd1a8c5574bfa3a101daa31cbb.zip
gdb-219d6836e939d2cd1a8c5574bfa3a101daa31cbb.tar.gz
gdb-219d6836e939d2cd1a8c5574bfa3a101daa31cbb.tar.bz2
Fix a segmentation fault triggered by disassembling an EFi file with source included.
* dwarf2.c (_bfd_dwarf2_find_symbol_bias): Check for a NULL symbol table pointer. * coffgen.c (coff_find_nearest_line_with_names): Do not call _bfd_dwarf2_find_symbol_bias if there is no symbol table available. https://bugzilla.redhat.com/show_bug.cgi?id=1685727
Diffstat (limited to 'bfd/dwarf2.c')
-rw-r--r--bfd/dwarf2.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bfd/dwarf2.c b/bfd/dwarf2.c
index 0b4e485..56557bb 100644
--- a/bfd/dwarf2.c
+++ b/bfd/dwarf2.c
@@ -4472,7 +4472,7 @@ _bfd_dwarf2_find_symbol_bias (asymbol ** symbols, void ** pinfo)
stash = (struct dwarf2_debug *) *pinfo;
- if (stash == NULL)
+ if (stash == NULL || symbols == NULL)
return 0;
for (unit = stash->all_comp_units; unit; unit = unit->next_unit)