diff options
author | Lee Duncan <lduncan@suse.com> | 2022-01-25 10:11:58 -0800 |
---|---|---|
committer | Lee Duncan <lduncan@suse.com> | 2022-01-25 10:11:58 -0800 |
commit | 151e701d08e16dce545d017e57c3d5ac957b7c1e (patch) | |
tree | c0c0ab43e4870787c1bcda37ecde576b09e41487 /usr/auth.c | |
parent | 66bb7ab93ac4bc9749b20b8f4e6d3e1b82983383 (diff) | |
download | open-iscsi-151e701d08e16dce545d017e57c3d5ac957b7c1e.tar.gz |
Fix issues discovered by gcc12
Gcc-12 caught a few errors in the code where we were checking
for an array being empty incorrectly, so this commit fixes those.
Diffstat (limited to 'usr/auth.c')
-rw-r--r-- | usr/auth.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -109,7 +109,7 @@ acl_chap_auth_request(struct iscsi_acl *client, char *username, unsigned int id, unsigned char verify_data[client->chap_challenge_len]; /* the expected credentials are in the session */ - if (session->username_in == NULL) { + if (session->username_in[0] == '\0') { log_error("failing authentication, no incoming username " "configured to authenticate target %s", session->target_name); @@ -122,7 +122,6 @@ acl_chap_auth_request(struct iscsi_acl *client, char *username, unsigned int id, } if ((session->password_in_length < 1) || - (session->password_in == NULL) || (session->password_in[0] == '\0')) { log_error("failing authentication, no incoming password " "configured to authenticate target %s", |