summaryrefslogtreecommitdiffstats
path: root/Utilities/cmcurl/lib/file.c
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-12-05 16:50:43 (GMT)
committerBrad King <brad.king@kitware.com>2016-12-05 16:50:43 (GMT)
commitf8a1ba202f51e70510f12f46fe0633ea908d5144 (patch)
treefe7f931cdb5c0049cd97660e3888a816dfd4a86f /Utilities/cmcurl/lib/file.c
parent25d7b1ca9d3a160850ad1f147ff96ac7c55f7d9f (diff)
parent93cc249f3dd7ecd621cd063e4c08bbdb54d971e8 (diff)
downloadCMake-f8a1ba202f51e70510f12f46fe0633ea908d5144.zip
CMake-f8a1ba202f51e70510f12f46fe0633ea908d5144.tar.gz
CMake-f8a1ba202f51e70510f12f46fe0633ea908d5144.tar.bz2
Merge branch 'upstream-curl' into update-curl
* upstream-curl: curl 2016-11-02 (3c561c65)
Diffstat (limited to 'Utilities/cmcurl/lib/file.c')
-rw-r--r--Utilities/cmcurl/lib/file.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/Utilities/cmcurl/lib/file.c b/Utilities/cmcurl/lib/file.c
index b534ec1..272289e 100644
--- a/Utilities/cmcurl/lib/file.c
+++ b/Utilities/cmcurl/lib/file.c
@@ -190,14 +190,15 @@ static CURLcode file_connect(struct connectdata *conn, bool *done)
struct FILEPROTO *file = data->req.protop;
int fd;
#ifdef DOS_FILESYSTEM
- int i;
+ size_t i;
char *actual_path;
#endif
- int real_path_len;
+ size_t real_path_len;
- real_path = curl_easy_unescape(data, data->state.path, 0, &real_path_len);
- if(!real_path)
- return CURLE_OUT_OF_MEMORY;
+ CURLcode result = Curl_urldecode(data, data->state.path, 0, &real_path,
+ &real_path_len, FALSE);
+ if(result)
+ return result;
#ifdef DOS_FILESYSTEM
/* If the first character is a slash, and there's