strncpy() instead of memcpy() in get_link(const char *).