forked from msys2/MINGW-packages
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
curl: Fix regression with netrc handling
- Loading branch information
Showing
2 changed files
with
23 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
diff --git a/lib/url.c b/lib/url.c | ||
index a56e4b0..9f29593 100644 | ||
--- a/lib/url.c | ||
+++ b/lib/url.c | ||
@@ -2971,6 +2971,12 @@ static CURLcode override_login(struct Curl_easy *data, | ||
/* don't update the user name below */ | ||
userp = NULL; | ||
} | ||
+ /* no user was set but a password, set a blank user */ | ||
+ if(userp && !*userp && *passwdp) { | ||
+ *userp = strdup(""); | ||
+ if(!*userp) | ||
+ return CURLE_OUT_OF_MEMORY; | ||
+ } | ||
} | ||
#endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters