Date: Thu, 29 Oct 2015 23:06:33 +0000 (UTC) From: Bryan Drewery <bdrewery@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r290169 - head/lib/libc/iconv Message-ID: <201510292306.t9TN6Xa6075025@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: bdrewery Date: Thu Oct 29 23:06:33 2015 New Revision: 290169 URL: https://svnweb.freebsd.org/changeset/base/290169 Log: Use memmove(3) to avoid overlapping copy. Reported by: valgrind MFC after: 2 weeks X-MFC-With: r290168 Modified: head/lib/libc/iconv/citrus_esdb.c Modified: head/lib/libc/iconv/citrus_esdb.c ============================================================================== --- head/lib/libc/iconv/citrus_esdb.c Thu Oct 29 23:02:34 2015 (r290168) +++ head/lib/libc/iconv/citrus_esdb.c Thu Oct 29 23:06:33 2015 (r290169) @@ -328,7 +328,7 @@ _citrus_esdb_get_list(char ***rlist, siz (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,
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201510292306.t9TN6Xa6075025>