aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDaniel Stenberg <daniel@haxx.se>2006-09-20 21:49:41 +0000
committerDaniel Stenberg <daniel@haxx.se>2006-09-20 21:49:41 +0000
commitec4a16f2e01b0b92e16fc841bc676394f37022f1 (patch)
tree7abb7dfa87e76e05c216a6d0196ed5236c82c8bf /lib
parentca5de26f50ae3c02db92592cd0aec1ff4fcc9785 (diff)
Armel Asselin fixed problems when you gave a proxy URL with user name and
empty password or no password at all. Test case 278 and 279 were added to verify.
Diffstat (limited to 'lib')
-rw-r--r--lib/url.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/url.c b/lib/url.c
index 71a827e7a..20f546900 100644
--- a/lib/url.c
+++ b/lib/url.c
@@ -3698,8 +3698,9 @@ static CURLcode CreateConnection(struct SessionHandle *data,
if(atsign) {
char proxyuser[MAX_CURL_USER_LENGTH];
char proxypasswd[MAX_CURL_PASSWORD_LENGTH];
+ proxypasswd[0] = 0;
- if(2 == sscanf(proxyptr,
+ if(1 <= sscanf(proxyptr,
"%" MAX_CURL_USER_LENGTH_TXT"[^:]:"
"%" MAX_CURL_PASSWORD_LENGTH_TXT "[^@]",
proxyuser, proxypasswd)) {