mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-11-01 17:08:10 +00:00
cifs: check for NULL session password
It's possible for a cifsSesInfo struct to have a NULL password, so we need to check for that prior to running strncmp on it. Signed-off-by: Jeff Layton <jlayton@redhat.com> Signed-off-by: Steve French <sfrench@us.ibm.com>
This commit is contained in:
parent
3ec6bbcdb4
commit
24e6cf92fd
1 changed files with 1 additions and 0 deletions
|
@ -1673,6 +1673,7 @@ cifs_find_smb_ses(struct TCP_Server_Info *server, struct smb_vol *vol)
|
|||
MAX_USERNAME_SIZE))
|
||||
continue;
|
||||
if (strlen(vol->username) != 0 &&
|
||||
ses->password != NULL &&
|
||||
strncmp(ses->password,
|
||||
vol->password ? vol->password : "",
|
||||
MAX_PASSWORD_SIZE))
|
||||
|
|
Loading…
Reference in a new issue