* plugin.c (is_ir_dummy_bfd): Don't segfault on NULL abfd.
This commit is contained in:
parent
e8b36cd1e5
commit
129b5d55a3
2 changed files with 9 additions and 1 deletions
|
@ -1,3 +1,7 @@
|
||||||
|
2010-11-04 Alan Modra <amodra@gmail.com>
|
||||||
|
|
||||||
|
* plugin.c (is_ir_dummy_bfd): Don't segfault on NULL abfd.
|
||||||
|
|
||||||
2010-11-03 Nick Clifton <nickc@redhat.com>
|
2010-11-03 Nick Clifton <nickc@redhat.com>
|
||||||
|
|
||||||
PR ld/12001
|
PR ld/12001
|
||||||
|
|
|
@ -245,7 +245,11 @@ plugin_get_ir_dummy_bfd (const char *name, bfd *srctemplate)
|
||||||
bfd_boolean
|
bfd_boolean
|
||||||
is_ir_dummy_bfd (const bfd *abfd)
|
is_ir_dummy_bfd (const bfd *abfd)
|
||||||
{
|
{
|
||||||
size_t namlen = strlen (abfd->filename);
|
size_t namlen;
|
||||||
|
|
||||||
|
if (abfd == NULL)
|
||||||
|
return FALSE;
|
||||||
|
namlen = strlen (abfd->filename);
|
||||||
if (namlen < IRONLY_SUFFIX_LEN)
|
if (namlen < IRONLY_SUFFIX_LEN)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
return !strcmp (abfd->filename + namlen - IRONLY_SUFFIX_LEN, IRONLY_SUFFIX);
|
return !strcmp (abfd->filename + namlen - IRONLY_SUFFIX_LEN, IRONLY_SUFFIX);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue