php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Return to Bug #69981
Patch ssh2_getpath revision 2019-03-20 20:01 UTC by ken at pardiac dot com
Patch ssh2_findpath revision 2019-03-20 19:48 UTC by ken at pardiac dot om
Patch ssh2_sftp_pathfix revision 2015-11-06 17:10 UTC by ken at pardiac dot com

Patch ssh2_getpath for ssh2 Bug #69981

Patch version 2019-03-20 20:01 UTC

Return to Bug #69981 | Download this patch
Patch Revisions:

Developer: ken@pardiac.com

--- ssh2_fopen_wrappers.c	2019-03-20 15:56:00.049063039 -0400
+++ ssh2_getpath.c	2019-03-20 15:55:50.601062831 -0400
@@ -226,9 +226,8 @@
 		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);
+	efree(resource->path);
+	resource->path = estrdup( strstr( strstr( path, "//" ) + 2, "/" ) );
 
 	/* Look for a resource ID to reuse a session */
 	s = resource->host;
 
PHP Copyright © 2001-2024 The PHP Group
All rights reserved.
Last updated: Thu Nov 21 17:01:32 2024 UTC