Rather use strncpy than memcpy.