3a4df29a92
GitOrigin-RevId: 3d7435c638baffaa826b85459df0fff47f12317d
16 lines
464 B
Diff
16 lines
464 B
Diff
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 && *passwdp) {
|
|
+ *userp = strdup("");
|
|
+ if(!*userp)
|
|
+ return CURLE_OUT_OF_MEMORY;
|
|
+ }
|
|
}
|
|
#endif
|