2e3134caf6
Comparing an int to a size, which is unsigned, causes the int to become unsigned, giving the wrong result. kinect_read returns the result of usb_control_msg, which can return a negtive 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: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org> |
||
---|---|---|
.. | ||
gl860 | ||
m5602 | ||
stv06xx | ||
autogain_functions.c | ||
benq.c | ||
conex.c | ||
cpia1.c | ||
dtcs033.c | ||
etoms.c | ||
finepix.c | ||
gspca.c | ||
gspca.h | ||
jeilinj.c | ||
jl2005bcd.c | ||
jpeg.h | ||
Kconfig | ||
kinect.c | ||
konica.c | ||
Makefile | ||
mars.c | ||
mr97310a.c | ||
nw80x.c | ||
ov519.c | ||
ov534_9.c | ||
ov534.c | ||
pac207.c | ||
pac7302.c | ||
pac7311.c | ||
pac_common.h | ||
se401.c | ||
se401.h | ||
sn9c20x.c | ||
sn9c2028.c | ||
sn9c2028.h | ||
sonixb.c | ||
sonixj.c | ||
spca500.c | ||
spca501.c | ||
spca505.c | ||
spca506.c | ||
spca508.c | ||
spca561.c | ||
spca1528.c | ||
sq905.c | ||
sq905c.c | ||
sq930x.c | ||
stk014.c | ||
stk1135.c | ||
stk1135.h | ||
stv0680.c | ||
sunplus.c | ||
t613.c | ||
topro.c | ||
touptek.c | ||
tv8532.c | ||
vc032x.c | ||
vicam.c | ||
w996Xcf.c | ||
xirlink_cit.c | ||
zc3xx-reg.h | ||
zc3xx.c |