Fix the segfault --- a/ssh2-0.12/ssh2_fopen_wrappers.c +++ b/ssh2-0.12/ssh2_fopen_wrappers.c @@ -218,14 +218,6 @@ return NULL; } - /* - Find resource->path in the path string, then copy the entire string from the original path. - This includes ?query#fragment in the path string - */ - s = resource->path; - resource->path = estrdup(strstr(path, resource->path)); - efree(s); - /* Look for a resource ID to reuse a session */ s = resource->host; if (strncmp(resource->host, "Resource id #", sizeof("Resource id #") - 1) == 0) {