* dwarf2read.c (recursively_find_pc_sect_symtab): Initialize "s"

before use.  Check for symtab->includes == NULL before scanning it.
This commit is contained in:
Doug Evans 2012-05-20 17:15:29 +00:00
parent 3550b23619
commit a3ec0bb1c4
2 changed files with 9 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2012-05-20 Doug Evans <dje@google.com>
* dwarf2read.c (recursively_find_pc_sect_symtab): Initialize "s"
before use. Check for symtab->includes == NULL before scanning it.
2012-05-18 Maciej W. Rozycki <macro@codesourcery.com>
* mips-tdep.c (mips_reg3_to_reg): Optimize storage.

View File

@ -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)