mirror of
https://github.com/freebsd/freebsd-src.git
synced 2024-11-30 15:12:44 +00:00
MFC r290169:
Use memmove(3) to avoid overlapping copy.
This commit is contained in:
parent
b61094414f
commit
01a698b2e0
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/stable/10/; revision=291799
@ -328,7 +328,7 @@ _citrus_esdb_get_list(char ***rlist, size_t *rnum, bool sorted)
|
||||
(int)_region_size(&data),
|
||||
(const char *)_region_head(&data));
|
||||
if ((p = strchr(buf1, '/')) != NULL)
|
||||
memcpy(buf1, p + 1, strlen(p) - 1);
|
||||
memmove(buf1, p + 1, strlen(p) - 1);
|
||||
if ((p = strstr(buf1, ".esdb")) != NULL)
|
||||
*p = '\0';
|
||||
snprintf(buf, sizeof(buf), "%s/%.*s", buf1,
|
||||
|
Loading…
Reference in New Issue
Block a user