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
parent 7434c16611
commit 85f2a13ee3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;