forked from Imagelibrary/binutils-gdb
asan: null dereference in coff_count_linenumbers
* coffgen.c (coff_count_linenumbers): Don't segfault when asymbol the_bfd is NULL.
This commit is contained in:
@@ -595,7 +595,8 @@ coff_count_linenumbers (bfd *abfd)
|
||||
{
|
||||
asymbol *q_maybe = *p;
|
||||
|
||||
if (bfd_family_coff (bfd_asymbol_bfd (q_maybe)))
|
||||
if (bfd_asymbol_bfd (q_maybe) != NULL
|
||||
&& bfd_family_coff (bfd_asymbol_bfd (q_maybe)))
|
||||
{
|
||||
coff_symbol_type *q = coffsymbol (q_maybe);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user