Fix memcpy/memmove bugs.