* nm.c (filter_symbols): Only call memcpy when from != to.

This commit is contained in:
Hans-Peter Nilsson 2008-11-13 10:57:00 +00:00
parent c31ad2a1f7
commit ede76260a7
2 changed files with 7 additions and 1 deletions

View File

@ -1,3 +1,8 @@
2008-11-13 Hans-Peter Nilsson <hp@axis.com>
Alan Modra <amodra@bigpond.net.au>
* nm.c (filter_symbols): Only call memcpy when from != to.
2008-11-10 Tristan Gingold <gingold@adacore.com>
Alan Modra <amodra@bigpond.net.au>

View File

@ -449,7 +449,8 @@ filter_symbols (bfd *abfd, bfd_boolean dynamic, void *minisyms,
if (keep)
{
memcpy (to, from, size);
if (to != from)
memcpy (to, from, size);
to += size;
}
}