Fix bug for memcpy and add memccpy, test