about summary refs log tree commit diff
path: root/string/argz-insert.c
diff options
context:
space:
mode:
authorThomas Bushnell, BSG <thomas@gnu.org>1996-07-08 05:37:55 +0000
committerThomas Bushnell, BSG <thomas@gnu.org>1996-07-08 05:37:55 +0000
commit18e8dd4dbff30a38b403dddd04ba0972c8a7cdb7 (patch)
treeef21d2560dfa5559d67b64d4636d392c0ab37d87 /string/argz-insert.c
parent28160ffb1c1b768e0fca4ccdb2843252100b5b81 (diff)
downloadglibc-18e8dd4dbff30a38b403dddd04ba0972c8a7cdb7.tar.gz
glibc-18e8dd4dbff30a38b403dddd04ba0972c8a7cdb7.tar.xz
glibc-18e8dd4dbff30a38b403dddd04ba0972c8a7cdb7.zip
(__argz_insert): Use memmove instead of memcpy for possible overlapping strings.
Diffstat (limited to 'string/argz-insert.c')
-rw-r--r--string/argz-insert.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/string/argz-insert.c b/string/argz-insert.c
index a110060e9d..3905728f2a 100644
--- a/string/argz-insert.c
+++ b/string/argz-insert.c
@@ -51,8 +51,8 @@ __argz_insert (char **argz, size_t *argz_len, char *before, const char *entry)
     if (new_argz)
       {
 	before = new_argz + (before - *argz);
-	memcpy (before + entry_len, before, after_before);
-	memcpy (before, entry, entry_len);
+	memmove (before + entry_len, before, after_before);
+	memmove (before, entry, entry_len);
 	*argz = new_argz;
 	*argz_len = new_argz_len;
 	return 0;