(lookup_symbol_in_function_table): Check for a function name before passing

it to strcmp.
This commit is contained in:
Nick Clifton 2005-12-27 16:07:36 +00:00
parent 92c2d36aa1
commit 650f284e0d
2 changed files with 6 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2005-12-27 Marty Leisner <leisner@rochester.rr.com>
* dwarf2.c (lookup_symbol_in_function_table): Check for a function
name before passing it to strcmp.
2005-12-27 Alan Modra <amodra@bigpond.net.au>
* elf.c (elf_find_function): Don't ignore section syms.

View File

@ -1467,6 +1467,7 @@ lookup_symbol_in_function_table (struct comp_unit *unit,
if ((!each_func->sec || each_func->sec == sec)
&& addr >= arange->low
&& addr < arange->high
&& each_func->name
&& strcmp (name, each_func->name) == 0
&& (!best_fit
|| ((arange->high - arange->low)