From a3ec0bb1c41e2827147c6533295d1f88746e534e Mon Sep 17 00:00:00 2001 From: Doug Evans <dje@google.com> Date: Sun, 20 May 2012 17:15:29 +0000 Subject: * dwarf2read.c (recursively_find_pc_sect_symtab): Initialize "s" before use. Check for symtab->includes == NULL before scanning it. --- gdb/dwarf2read.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gdb/dwarf2read.c') diff --git a/gdb/dwarf2read.c b/gdb/dwarf2read.c index 9729173..6ddf236 100644 --- a/gdb/dwarf2read.c +++ b/gdb/dwarf2read.c @@ -3003,9 +3003,12 @@ recursively_find_pc_sect_symtab (struct symtab *symtab, CORE_ADDR pc) && blockvector_contains_pc (BLOCKVECTOR (symtab), pc)) return symtab; + if (symtab->includes == NULL) + return NULL; + for (i = 0; symtab->includes[i]; ++i) { - struct symtab *s; + struct symtab *s = symtab->includes[i]; s = recursively_find_pc_sect_symtab (s, pc); if (s != NULL) -- cgit v1.1