diff options
author | Namjae Jeon <namjae.jeon@samsung.com> | 2021-05-29 07:59:40 +0900 |
---|---|---|
committer | Namjae Jeon <namjae.jeon@samsung.com> | 2021-05-29 08:00:39 +0900 |
commit | 152de8c68d13845592e8e511136842bcdb691063 (patch) | |
tree | 359054e22aee7883d205452330e50824407f7ea4 /tools/perf/scripts/python/export-to-sqlite.py | |
parent | a6a5fa77805b291afc90291a6ae705b1759b9735 (diff) |
cifsd: fix Control flow issues in ksmbd_build_ntlmssp_challenge_blob()
Fix a defect reported by Coverity Scan.
*** CID 1504970: Control flow issues (NO_EFFECT)
/fs/cifsd/auth.c: 622 in ksmbd_build_ntlmssp_challenge_blob()
616 name = kmalloc(2 + UNICODE_LEN(len), GFP_KERNEL);
617 if (!name)
618 return -ENOMEM;
619
620 conv_len = smb_strtoUTF16((__le16 *)name,
ksmbd_netbios_name(), len,
621 sess->conn->local_nls);
>>> CID 1504970: Control flow issues (NO_EFFECT)
>>> This less-than-zero comparison of an unsigned value is never true.
622 if (conv_len < 0 || conv_len > len) {
623 kfree(name);
624 return -EINVAL;
625 }
626
627 uni_len = UNICODE_LEN(conv_len);
Reported-by: Coverity Scan <scan-admin@coverity.com>
Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'tools/perf/scripts/python/export-to-sqlite.py')
0 files changed, 0 insertions, 0 deletions