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,
_______________________________________________
[email protected] mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "[email protected]"

Reply via email to