Use memmove(3) to avoid overlapping copy.
Reported by: valgrind MFC after: 2 weeks X-MFC-With: r290168