aboutsummaryrefslogtreecommitdiff
path: root/gdb/python/py-lazy-string.c
diff options
context:
space:
mode:
authorPádraig Brady <pbrady@fb.com>2017-03-24 15:12:53 +0000
committerPedro Alves <palves@redhat.com>2017-03-24 15:12:53 +0000
commit568c1b9f503649d19ed1d17e6970f212e6b6317d (patch)
tree12bfe74915f7385d4ae89a1404e9e12fcc7ed9c9 /gdb/python/py-lazy-string.c
parent62785b09987359ede74a98fac11343827f7181af (diff)
downloadgdb-568c1b9f503649d19ed1d17e6970f212e6b6317d.zip
gdb-568c1b9f503649d19ed1d17e6970f212e6b6317d.tar.gz
gdb-568c1b9f503649d19ed1d17e6970f212e6b6317d.tar.bz2
Avoid segfault on invalid directory table
gdb was segfaulting during backtrace on a binary here, where fe->dir_index parsed from the DWARF info was seen to access beyond the provided include_dirs array. This commit bounds the access to entries actually written to the array, and was verified to output the backtrace correctly. gdb/ChangeLog: * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't reference beyond the 'lh->include_dirs' array before accessing to it. (psymtab_include_file_name): Likewise. (dwarf_decode_lines_1): Likewise. (dwarf_decode_lines): Likewise. (file_file_name): Likewise.
Diffstat (limited to 'gdb/python/py-lazy-string.c')
0 files changed, 0 insertions, 0 deletions