aboutsummaryrefslogtreecommitdiff
path: root/tools/perf/util/trace-event-scripting.c
diff options
context:
space:
mode:
authorJulia Lawall <[email protected]>2018-07-01 19:32:04 +0200
committerGreg Kroah-Hartman <[email protected]>2018-07-02 18:08:19 +0200
commitd3ac5598c5010a8999978ebbcca3b1c6188ca36b (patch)
tree1bc50d50f1132364114f7de4900b19b7c88408ab /tools/perf/util/trace-event-scripting.c
parente9576fe8e605c4413beb91b290b8a473985710de (diff)
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 <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
Diffstat (limited to 'tools/perf/util/trace-event-scripting.c')
0 files changed, 0 insertions, 0 deletions