Go to file
Julia Lawall d3ac5598c5 usb: wusbcore: security: cast sizeof to int for comparison
Comparing an int to a size, which is unsigned, causes the int to become
unsigned, giving the wrong result.  usb_get_descriptor can return a
negative error code.

A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)

// <smpl>
@@
int x;
expression e,e1;
identifier f;
@@

*x = f(...);
... when != x = e1
    when != if (x < 0 || ...) { ... return ...; }
*x < sizeof(e)
// </smpl>

Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-07-02 18:08:19 +02:00
arch
block
certs
crypto
Documentation usb: typec: Add driver for DisplayPort alternate mode 2018-07-02 17:42:36 +02:00
drivers usb: wusbcore: security: cast sizeof to int for comparison 2018-07-02 18:08:19 +02:00
firmware
fs for-4.18-rc2-tag 2018-07-01 12:38:16 -07:00
include usb: typec: tcpm: Support for Alternate Modes 2018-07-02 17:42:36 +02:00
init
ipc
kernel
lib
LICENSES
mm
net
samples
scripts usb: typec: Bus type for alternate modes 2018-07-02 17:42:36 +02:00
security
sound
tools
usr
virt
.clang-format
.cocciconfig
.get_maintainer.ignore
.gitattributes
.gitignore
.mailmap
COPYING
CREDITS
Kbuild
Kconfig
MAINTAINERS usb: typec: Bus type for alternate modes 2018-07-02 17:42:36 +02:00
Makefile Linux 4.18-rc3 2018-07-01 16:04:53 -07:00
README

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.
See Documentation/00-INDEX for a list of what is contained in each file.

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.