mirror of
https://github.com/curl/curl.git
synced 2024-11-27 05:50:21 +08:00
url: Fixed missing length check in parse_proxy()
Commit 11332577b3
removed the length check that was performed by the
old scanf() code.
This commit is contained in:
parent
416ecc1584
commit
ddac43b38e
@ -4208,7 +4208,7 @@ static CURLcode parse_proxy(struct SessionHandle *data,
|
|||||||
username or password with reserved characters like ':' in
|
username or password with reserved characters like ':' in
|
||||||
them. */
|
them. */
|
||||||
Curl_safefree(conn->proxyuser);
|
Curl_safefree(conn->proxyuser);
|
||||||
if(proxyuser)
|
if(proxyuser && strlen(proxyuser) < MAX_CURL_USER_LENGTH)
|
||||||
conn->proxyuser = curl_easy_unescape(data, proxyuser, 0, NULL);
|
conn->proxyuser = curl_easy_unescape(data, proxyuser, 0, NULL);
|
||||||
else
|
else
|
||||||
conn->proxyuser = strdup("");
|
conn->proxyuser = strdup("");
|
||||||
@ -4217,7 +4217,7 @@ static CURLcode parse_proxy(struct SessionHandle *data,
|
|||||||
res = CURLE_OUT_OF_MEMORY;
|
res = CURLE_OUT_OF_MEMORY;
|
||||||
else {
|
else {
|
||||||
Curl_safefree(conn->proxypasswd);
|
Curl_safefree(conn->proxypasswd);
|
||||||
if(proxypasswd)
|
if(proxypasswd && strlen(proxypasswd) < MAX_CURL_PASSWORD_LENGTH)
|
||||||
conn->proxypasswd = curl_easy_unescape(data, proxypasswd, 0, NULL);
|
conn->proxypasswd = curl_easy_unescape(data, proxypasswd, 0, NULL);
|
||||||
else
|
else
|
||||||
conn->proxypasswd = strdup("");
|
conn->proxypasswd = strdup("");
|
||||||
|
Loading…
Reference in New Issue
Block a user