check that password is not blank

Co-authored-by: Robert Hensing <roberth@users.noreply.github.com>
This commit is contained in:
Domen Kožar
2022-06-09 16:18:35 +01:00
committed by GitHub
co-authored by Robert Hensing
parent 7434c16611
commit 85f2a13ee3
@@ -7,7 +7,7 @@ index a56e4b0..9f29593 100644
userp = NULL;
}
+ /* no user was set but a password, set a blank user */
+ if(userp && !*userp && *passwdp) {
+ if(userp && !*userp && passwdp && *passwdp) {
+ *userp = strdup("");
+ if(!*userp)
+ return CURLE_OUT_OF_MEMORY;