diff options
author | Daniel Stenberg <daniel@haxx.se> | 2016-10-08 11:21:38 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2016-10-31 08:46:35 +0100 |
commit | 46133aa536f7f5bf552b83369e3851b6f811299e (patch) | |
tree | c10a2320da0e6e4ef0027d8267c68fe1d706bce6 /lib/ssh.c | |
parent | 53e71e47d6b81650d26ec33a58d0dca24c7ffb2c (diff) | |
download | gnurl-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.c | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -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) { |