Patch ssh2_findpath for ssh2 Bug #69981
Patch version 2019-03-20 19:48 UTC
Return to Bug #69981 |
Download this patch
Patch Revisions:
Developer: ken@pardiac.om
--- ssh2_fopen_wrappers.c 2012-10-02 16:18:07.000000000 -0400
+++ ssh2_fopen_wrappers.c 2019-03-20 15:36:40.000000000 -0400
@@ -219,12 +219,11 @@
}
/*
- Find resource->path in the path string, then copy the entire string from the original path.
- This includes ?query#fragment in the path string
+ Put path, query and fragment from the url back together to get a filename
+ that may have contained ? or #.
*/
- s = resource->path;
- resource->path = estrdup(strstr(path, resource->path));
- efree(s);
+ efree(resource->path);
+ resource->path = estrdup( strstr( strstr( path, "//" ) + 2, "/" ) );
/* Look for a resource ID to reuse a session */
s = resource->host;
|