summaryrefslogtreecommitdiff
path: root/lib/urlapi.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2019-05-13 18:42:05 +0200
committerDaniel Stenberg <daniel@haxx.se>2019-05-13 18:42:05 +0200
commit4dee40ead3a0401ec1ac300d455c8efbe84faa09 (patch)
tree1fdec3ff644e066de614c6bc1a41c3213a19c4b4 /lib/urlapi.c
parentc9c5304dd4747cbe75d2f24be85920d572fcb5b8 (diff)
downloadcurl-4dee40ead3a0401ec1ac300d455c8efbe84faa09.tar.gz
urlapi: require a non-zero host name length when parsing URLbagder/urlparse-without-host
Updated test 1560 to verify.
Diffstat (limited to 'lib/urlapi.c')
-rw-r--r--lib/urlapi.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/urlapi.c b/lib/urlapi.c
index c66c07f0a..0d05f4d92 100644
--- a/lib/urlapi.c
+++ b/lib/urlapi.c
@@ -636,6 +636,8 @@ static CURLUcode hostname_check(struct Curl_URL *u, char *hostname)
/* hostname with bad content */
return CURLUE_MALFORMED_INPUT;
}
+ if(!hostname[0])
+ return CURLUE_NO_HOST;
return CURLUE_OK;
}