aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2019-05-13 18:42:05 +0200
committerDaniel Stenberg <daniel@haxx.se>2019-05-14 13:39:10 +0200
commit9f9ec7da570bf1468eafe611023627c9a2b0b5d2 (patch)
tree08321d1435ca5ac73a6b981e07feca2e84278725 /lib
parentc60042fe09dec5b220d65ad34c674b1fd9346e12 (diff)
urlapi: require a non-zero host name length when parsing URL
Updated test 1560 to verify. Closes #3880
Diffstat (limited to 'lib')
-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;
}