mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-04 18:19:28 +09:00
152de8c68d13845592e8e511136842bcdb691063
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>
Linux kernel
============
There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.
In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``. The formatted documentation can also be read online at:
https://www.kernel.org/doc/html/latest/
There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.
Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.
Description
Languages
C
97.7%
Assembly
1.6%
Makefile
0.3%
Perl
0.1%