if (strstr (dl_name, "../")) return NULL;
__lc_path(dl_name, lc_dir)const char *dl_name;const char *lc_dir;{    char *path;    size_t len;#if defined(_LP64) && !defined(__NetBSD__)    len = (lc_dir ? strlen(lc_dir) : 0 ) +	(dl_name ? strlen(dl_name) : 0) + _MACH64_NAME_LEN + 10;    path = Xmalloc(len + 1);    if (strchr(dl_name, '/') != NULL) {	char *tmp = strdup(dl_name);	char *dl_dir, *dl_file;	char *slash_p;	slash_p = strchr(tmp, '/');	*slash_p = '\0';	dl_dir = tmp;	dl_file = ++slash_p;	slash_p = strrchr(lc_dir, '/');	*slash_p = '\0';	strcpy(path, lc_dir); strcat(path, "/");	strcat(path, dl_dir); strcat(path, "/");	strcat(path, _MACH64_NAME); strcat(path, "/");	strcat(path, dl_file); strcat(path, ".so.2");	*slash_p = '/';	Xfree(tmp);    } else {	strcpy(path, lc_dir); strcat(path, "/");	strcat(path, _MACH64_NAME); strcat(path, "/");	strcat(path, dl_name); strcat(path, ".so.2");    }#else    len = (lc_dir ? strlen(lc_dir) : 0 ) +	(dl_name ? strlen(dl_name) : 0) + 10;    path = Xmalloc(len + 1);    if (strchr(dl_name, '/') != NULL) {	char *slash_p;	slash_p = strrchr(lc_dir, '/');	*slash_p = '\0';	strcpy(path, lc_dir); strcat(path, "/");	strcat(path, dl_name); strcat(path, ".so.2");	*slash_p = '/';    } else {	strcpy(path, lc_dir); strcat(path, "/");	strcat(path, dl_name); strcat(path, ".so.2");    }#endif    return path;}