summaryrefslogtreecommitdiff
path: root/libiberty/dyn-string.c
diff options
context:
space:
mode:
Diffstat (limited to 'libiberty/dyn-string.c')
-rw-r--r--libiberty/dyn-string.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libiberty/dyn-string.c b/libiberty/dyn-string.c
index ea711182ca5..8d2456b86c8 100644
--- a/libiberty/dyn-string.c
+++ b/libiberty/dyn-string.c
@@ -277,7 +277,7 @@ dyn_string_insert_cstr (dyn_string_t dest, int pos, const char *src)
for (i = dest->length; i >= pos; --i)
dest->s[i + length] = dest->s[i];
/* Splice in the new stuff. */
- strncpy (dest->s + pos, src, length);
+ memcpy (dest->s + pos, src, length);
/* Compute the new length. */
dest->length += length;
return 1;