projects
/
binutils-gdb.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
21aacea
)
asan: null dereference in coff_count_linenumbers
author
Alan Modra
<amodra@gmail.com>
Sat, 4 Jun 2022 09:07:20 +0000
(18:37 +0930)
committer
Alan Modra
<amodra@gmail.com>
Sat, 4 Jun 2022 11:27:36 +0000
(20:57 +0930)
* coffgen.c (coff_count_linenumbers): Don't segfault when asymbol
the_bfd is NULL.
bfd/coffgen.c
patch
|
blob
|
history
diff --git
a/bfd/coffgen.c
b/bfd/coffgen.c
index c693cfc00cb5a140f950b8fada71e21ffa016b5d..07b3fb446aa28d9f4e1719df05d3e2b9d22e8959 100644
(file)
--- a/
bfd/coffgen.c
+++ b/
bfd/coffgen.c
@@
-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);