lib: stop NULL-checking conn->passwd and ->user

They always point to a string. The string might be zero length.

Closes #19059
This commit is contained in:
Daniel Stenberg 2025-10-14 14:43:46 +02:00
parent 5e46318414
commit 62961d6cc5
No known key found for this signature in database
GPG key ID: 5CC908FDB71E12C2
3 changed files with 4 additions and 10 deletions

View file

@ -2606,7 +2606,7 @@ static CURLcode ftp_state_user_resp(struct Curl_easy *data,
/* 331 Password required for ...
(the server requires to send the user's password too) */
result = Curl_pp_sendf(data, &ftpc->pp, "PASS %s",
data->conn->passwd ? data->conn->passwd : "");
data->conn->passwd);
if(!result)
ftp_state(data, ftpc, FTP_PASS);
}