summaryrefslogtreecommitdiff
path: root/lib/ssh.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2016-10-08 11:21:38 +0200
committerDaniel Stenberg <daniel@haxx.se>2016-10-31 08:46:35 +0100
commit46133aa536f7f5bf552b83369e3851b6f811299e (patch)
treec10a2320da0e6e4ef0027d8267c68fe1d706bce6 /lib/ssh.c
parent53e71e47d6b81650d26ec33a58d0dca24c7ffb2c (diff)
downloadgnurl-46133aa536f7f5bf552b83369e3851b6f811299e.tar.gz
gnurl-46133aa536f7f5bf552b83369e3851b6f811299e.tar.bz2
gnurl-46133aa536f7f5bf552b83369e3851b6f811299e.zip
escape: avoid using curl_easy_unescape() internally
Since the internal Curl_urldecode() function has a better API.
Diffstat (limited to 'lib/ssh.c')
-rw-r--r--lib/ssh.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/ssh.c b/lib/ssh.c
index d403c5727..fff578c7b 100644
--- a/lib/ssh.c
+++ b/lib/ssh.c
@@ -416,12 +416,12 @@ static CURLcode ssh_getworkingpath(struct connectdata *conn,
struct Curl_easy *data = conn->data;
char *real_path = NULL;
char *working_path;
- int working_path_len;
-
- working_path = curl_easy_unescape(data, data->state.path, 0,
- &working_path_len);
- if(!working_path)
- return CURLE_OUT_OF_MEMORY;
+ size_t working_path_len;
+ CURLcode result =
+ Curl_urldecode(data, data->state.path, 0, &working_path,
+ &working_path_len, FALSE);
+ if(result)
+ return result;
/* Check for /~/, indicating relative to the user's home directory */
if(conn->handler->protocol & CURLPROTO_SCP) {