fix undefined pointer comparison in memmove