MFC r290169:

Use memmove(3) to avoid overlapping copy.
This commit is contained in:
Bryan Drewery 2015-12-04 18:24:47 +00:00
parent b61094414f
commit 01a698b2e0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/stable/10/; revision=291799

View File

@ -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,