aboutsummaryrefslogtreecommitdiff
path: root/bfd/mmo.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfd/mmo.c')
-rw-r--r--bfd/mmo.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/bfd/mmo.c b/bfd/mmo.c
index 5209736..92c51a4 100644
--- a/bfd/mmo.c
+++ b/bfd/mmo.c
@@ -2938,7 +2938,8 @@ mmo_write_symbols_and_terminator (bfd *abfd)
if (table == NULL)
return FALSE;
- memcpy (table, orig_table, count * sizeof (asymbol *));
+ if (count != 0)
+ memcpy (table, orig_table, count * sizeof (asymbol *));
/* Move :Main (if there is one) to the first position. This is
necessary to get the same layout of the trie-tree when linking as