mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-11-23 18:14:13 +08:00
ubsan: alpha: member access within null pointer
* elf64-alpha.c (elf64_alpha_relax_with_lituse): Avoid UB.
This commit is contained in:
parent
174fe10cb6
commit
f2cfdb7486
@ -3191,7 +3191,8 @@ elf64_alpha_relax_with_lituse (struct alpha_relax_info *info,
|
||||
}
|
||||
|
||||
/* Can't relax dynamic symbols. */
|
||||
if (alpha_elf_dynamic_symbol_p (&info->h->root, info->link_info))
|
||||
if (info->h != NULL
|
||||
&& alpha_elf_dynamic_symbol_p (&info->h->root, info->link_info))
|
||||
return true;
|
||||
|
||||
changed_contents = info->changed_contents;
|
||||
|
Loading…
Reference in New Issue
Block a user