mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-03 07:38:10 +00:00
CIFS: session servername can't be null
remove impossible check Pointed out by Coverity (CID 115422) Signed-off-by: Steve French <smfrench@gmail.com> Reviewed-by: Jeff Layton <jlayton@samba.org>
This commit is contained in:
parent
c85c35f8fc
commit
8b7a454443
1 changed files with 5 additions and 1 deletions
|
@ -1,6 +1,9 @@
|
||||||
/*
|
/*
|
||||||
* fs/cifs/cifsencrypt.c
|
* fs/cifs/cifsencrypt.c
|
||||||
*
|
*
|
||||||
|
* Encryption and hashing operations relating to NTLM, NTLMv2. See MS-NLMP
|
||||||
|
* for more detailed information
|
||||||
|
*
|
||||||
* Copyright (C) International Business Machines Corp., 2005,2013
|
* Copyright (C) International Business Machines Corp., 2005,2013
|
||||||
* Author(s): Steve French (sfrench@us.ibm.com)
|
* Author(s): Steve French (sfrench@us.ibm.com)
|
||||||
*
|
*
|
||||||
|
@ -515,7 +518,8 @@ static int calc_ntlmv2_hash(struct cifs_ses *ses, char *ntlmv2_hash,
|
||||||
__func__);
|
__func__);
|
||||||
return rc;
|
return rc;
|
||||||
}
|
}
|
||||||
} else if (ses->serverName) {
|
} else {
|
||||||
|
/* We use ses->serverName if no domain name available */
|
||||||
len = strlen(ses->serverName);
|
len = strlen(ses->serverName);
|
||||||
|
|
||||||
server = kmalloc(2 + (len * 2), GFP_KERNEL);
|
server = kmalloc(2 + (len * 2), GFP_KERNEL);
|
||||||
|
|
Loading…
Reference in a new issue