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:
4a947dc
)
bfd: Check NULL pointer before setting ref_real
author
H.J. Lu
<hjl.tools@gmail.com>
Thu, 5 May 2022 00:00:15 +0000
(17:00 -0700)
committer
H.J. Lu
<hjl.tools@gmail.com>
Thu, 5 May 2022 00:57:58 +0000
(17:57 -0700)
PR ld/29086
* linker.c (bfd_wrapped_link_hash_lookup): Check NULL pointer
before setting ref_real.
bfd/linker.c
patch
|
blob
|
history
diff --git
a/bfd/linker.c
b/bfd/linker.c
index e9ebdbad040ebb164f5517c8befc60d46eb021c2..0c2e3c10a67aa335cd019e6a9baab5aa903b1499 100644
(file)
--- a/
bfd/linker.c
+++ b/
bfd/linker.c
@@
-599,7
+599,8
@@
bfd_wrapped_link_hash_lookup (bfd *abfd,
n[1] = '\0';
strcat (n, l + sizeof REAL - 1);
h = bfd_link_hash_lookup (info->hash, n, create, true, follow);
- h->ref_real = 1;
+ if (h != NULL)
+ h->ref_real = 1;
free (n);
return h;
}