diff options
author | Thomas Bushnell, BSG <thomas@gnu.org> | 1996-07-08 05:37:55 +0000 |
---|---|---|
committer | Thomas Bushnell, BSG <thomas@gnu.org> | 1996-07-08 05:37:55 +0000 |
commit | 18e8dd4dbff30a38b403dddd04ba0972c8a7cdb7 (patch) | |
tree | ef21d2560dfa5559d67b64d4636d392c0ab37d87 | |
parent | 28160ffb1c1b768e0fca4ccdb2843252100b5b81 (diff) | |
download | glibc-18e8dd4dbff30a38b403dddd04ba0972c8a7cdb7.tar glibc-18e8dd4dbff30a38b403dddd04ba0972c8a7cdb7.tar.gz glibc-18e8dd4dbff30a38b403dddd04ba0972c8a7cdb7.tar.bz2 glibc-18e8dd4dbff30a38b403dddd04ba0972c8a7cdb7.zip |
(__argz_insert): Use memmove instead of memcpy for possible overlapping strings.
-rw-r--r-- | string/argz-insert.c | 4 |
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; |