mirror of
https://github.com/curl/curl.git
synced 2026-08-24 12:33:37 +03:00
url: a zero-length userinfo part in the URL is still a (blank) user
Adjusted test 1560 to verify Reported-by: Jay Satiro Fixes #9088 Closes #9590
This commit is contained in:
parent
61c7ccab83
commit
1a87a1efba
2 changed files with 17 additions and 5 deletions
|
|
@ -2912,15 +2912,15 @@ CURLcode Curl_parse_login_details(const char *login, const size_t len,
|
|||
(psep && psep > osep ? (size_t)(psep - osep) :
|
||||
(size_t)(login + len - osep)) - 1 : 0);
|
||||
|
||||
/* Allocate the user portion buffer */
|
||||
if(userp && ulen) {
|
||||
/* Allocate the user portion buffer, which can be zero length */
|
||||
if(userp) {
|
||||
ubuf = malloc(ulen + 1);
|
||||
if(!ubuf)
|
||||
result = CURLE_OUT_OF_MEMORY;
|
||||
}
|
||||
|
||||
/* Allocate the password portion buffer */
|
||||
if(!result && passwdp && plen) {
|
||||
if(!result && passwdp && psep) {
|
||||
pbuf = malloc(plen + 1);
|
||||
if(!pbuf) {
|
||||
free(ubuf);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue