Replace ffi.copy with loop (source and destination overlapped).