aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ld/ldlang.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ld/ldlang.c b/ld/ldlang.c
index cf4294d..2e82eef 100644
--- a/ld/ldlang.c
+++ b/ld/ldlang.c
@@ -10728,7 +10728,7 @@ cmdline_add_object_only_section (bfd_byte *contents, size_t size)
long src_count = 0, dst_count = 0;
asymbol **from, **to;
- osympp = (asymbol **) xmalloc (symcount * sizeof (asymbol *));
+ osympp = xmalloc ((symcount + 1) * sizeof (asymbol *));
from = isympp;
to = osympp;
for (; src_count < symcount; src_count++)