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/tftp.c | |
parent | 53e71e47d6b81650d26ec33a58d0dca24c7ffb2c (diff) | |
download | curl-46133aa536f7f5bf552b83369e3851b6f811299e.tar.gz |
escape: avoid using curl_easy_unescape() internally
Since the internal Curl_urldecode() function has a better API.
Diffstat (limited to 'lib/tftp.c')
-rw-r--r-- | lib/tftp.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/tftp.c b/lib/tftp.c index 5922d7741..4c90de667 100644 --- a/lib/tftp.c +++ b/lib/tftp.c @@ -58,6 +58,7 @@ #include "rawstr.h" #include "speedcheck.h" #include "select.h" +#include "escape.h" /* The last 3 #include files should be in this order */ #include "curl_printf.h" @@ -484,10 +485,10 @@ static CURLcode tftp_send_first(tftp_state_data_t *state, tftp_event_t event) /* As RFC3617 describes the separator slash is not actually part of the file name so we skip the always-present first letter of the path string. */ - filename = curl_easy_unescape(data, &state->conn->data->state.path[1], 0, - NULL); - if(!filename) - return CURLE_OUT_OF_MEMORY; + result = Curl_urldecode(data, &state->conn->data->state.path[1], 0, + &filename, NULL, FALSE); + if(result) + return result; snprintf((char *)state->spacket.data+2, state->blksize, |