mirror of git://sourceware.org/git/glibc.git
string/argz-delete.c (argz_delete): Use memmove instead of memcpy for possbly overlapping strings.
This commit is contained in:
parent
3ee8457d47
commit
00e125db5a
|
@ -31,7 +31,7 @@ argz_delete (char **argz, size_t *argz_len, char *entry)
|
|||
{
|
||||
size_t entry_len = strlen (entry) + 1;
|
||||
*argz_len -= entry_len;
|
||||
memcpy (entry, entry + entry_len, *argz_len - (entry - *argz));
|
||||
memmove (entry, entry + entry_len, *argz_len - (entry - *argz));
|
||||
if (*argz_len == 0)
|
||||
{
|
||||
free (*argz);
|
||||
|
|
Loading…
Reference in New Issue