aboutsummaryrefslogtreecommitdiff
path: root/lib/url.c
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2004-05-07 18:46:28 +0000
committerDaniel Stenberg <daniel@haxx.se>2004-05-07 18:46:28 +0000
commit3394c01826aef99a645db398c1fb6bce4693bd35 (patch)
treec03e8d01e78b5db486cdb66c53e06de054a7fd98 /lib/url.c
parentd67ea8c7ad76380c9c757072d402f62513985a05 (diff)
We don't support any long protocol names so we can use a smaller buffer.
Also, make sure we have room for the trailing zero, only scan to size-1. Gisle Vanem reported.
Diffstat (limited to 'lib/url.c')
-rw-r--r--lib/url.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/url.c b/lib/url.c
index 830ab9d30..fc7a9d4e0 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -2148,7 +2148,7 @@ static CURLcode CreateConnection(struct SessionHandle *data,
* proxy -- and we don't know if we will need to use SSL until we parse the
* url ...
************************************************************/
- if((2 == sscanf(data->change.url, "%64[^:]:%[^\n]",
+ if((2 == sscanf(data->change.url, "%15[^:]:%[^\n]",
conn->protostr,
conn->path)) && strequal(conn->protostr, "file")) {
if(conn->path[0] == '/' && conn->path[1] == '/') {
@@ -2208,7 +2208,7 @@ static CURLcode CreateConnection(struct SessionHandle *data,
* that missing slash at the beginning of the path.
*/
if (2 > sscanf(data->change.url,
- "%64[^\n:]://%[^\n/?]%[^\n]",
+ "%15[^\n:]://%[^\n/?]%[^\n]",
conn->protostr,
conn->host.name, conn->path)) {