Fix safe_strcpy() not terminating string