summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2019-05-20 10:24:18 +0200
committerDaniel Stenberg <daniel@haxx.se>2019-05-20 10:24:18 +0200
commita74a20a673b85969ff04fce1f9cc047611ccec43 (patch)
tree353b07f749c678f0d2fbe49ea9a7954d3676dc3a /lib
parent0374d05d3b530c0236a275e8bf848591fe28c870 (diff)
downloadcurl-bagder/longer-url-scheme.tar.gz
fixup also prevent curl_url_set() to set a too long schemebagder/longer-url-scheme
Diffstat (limited to 'lib')
-rw-r--r--lib/urlapi.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/urlapi.c b/lib/urlapi.c
index 1b849aab5..d07e4f5df 100644
--- a/lib/urlapi.c
+++ b/lib/urlapi.c
@@ -1217,6 +1217,9 @@ CURLUcode curl_url_set(CURLU *u, CURLUPart what,
switch(what) {
case CURLUPART_SCHEME:
+ if(strlen(part) > MAX_SCHEME_LEN)
+ /* too long */
+ return CURLUE_MALFORMED_INPUT;
if(!(flags & CURLU_NON_SUPPORT_SCHEME) &&
/* verify that it is a fine scheme */
!Curl_builtin_scheme(part))