summaryrefslogtreecommitdiff
path: root/lib/urlapi.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2019-10-01 10:51:25 +0200
committerDaniel Stenberg <daniel@haxx.se>2019-10-01 10:51:25 +0200
commitc7d8c9cb1231b04c4a1f6c75bf4dcb2d93b43d3b (patch)
treef2f4e11cbee0830f71ad54dc4df390dc9decf54f /lib/urlapi.c
parent1b433002066c85265440993e53a636c2ee46c9e2 (diff)
downloadcurl-c7d8c9cb1231b04c4a1f6c75bf4dcb2d93b43d3b.tar.gz
fixup skip empty paths
Diffstat (limited to 'lib/urlapi.c')
-rw-r--r--lib/urlapi.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/urlapi.c b/lib/urlapi.c
index c8f2eaa98..989c0e4e2 100644
--- a/lib/urlapi.c
+++ b/lib/urlapi.c
@@ -849,7 +849,7 @@ static CURLUcode seturl(const char *url, CURLU *u, unsigned int flags)
if(junkscan(path))
return CURLUE_MALFORMED_INPUT;
- if(flags & CURLU_URLENCODE) {
+ if((flags & CURLU_URLENCODE) && path[0]) {
/* worst case output length is 3x the original! */
char *newp = malloc(strlen(path) * 3);
if(!newp)