diff options
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, |