kernel_samsung_a53x/drivers/media/usb/gspca
Jinjie Ruan 99b5366062 media: gspca: ov534-ov772x: Fix off-by-one error in set_frame_rate()
commit d2842dec577900031826dc44e9bf0c66416d7173 upstream.

In set_frame_rate(), select a rate in rate_0 or rate_1 by checking
sd->frame_rate >= r->fps in a loop, but the loop condition terminates when
the index reaches zero, which fails to check the last elememt in rate_0 or
rate_1.

Check for >= 0 so that the last one in rate_0 or rate_1 is also checked.

Fixes: 189d92af707e ("V4L/DVB (13422): gspca - ov534: ov772x changes from Richard Kaswy.")
Cc: stable@vger.kernel.org
Signed-off-by: Jinjie Ruan <ruanjinjie@huawei.com>
Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-12-17 13:20:50 +01:00
..
gl860 Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
m5602 Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stv06xx Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
autogain_functions.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
benq.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
conex.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
cpia1.c media: gspca: cpia1: shift-out-of-bounds in set_flicker 2024-11-18 11:43:14 +01:00
dtcs033.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
etoms.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
finepix.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gspca.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
gspca.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
jeilinj.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
jl2005bcd.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
jpeg.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Kconfig Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
kinect.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
konica.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
Makefile Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mars.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
mr97310a.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
nw80x.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ov519.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
ov534.c media: gspca: ov534-ov772x: Fix off-by-one error in set_frame_rate() 2024-12-17 13:20:50 +01:00
ov534_9.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pac207.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pac7302.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pac7311.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
pac_common.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
se401.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
se401.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sn9c20x.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sn9c2028.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sn9c2028.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sonixb.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sonixj.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spca500.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spca501.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spca505.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spca506.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spca508.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spca561.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
spca1528.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sq905.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sq905c.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sq930x.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stk014.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stk1135.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stk1135.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
stv0680.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
sunplus.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
t613.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
topro.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
touptek.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
tv8532.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vc032x.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
vicam.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
w996Xcf.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
xirlink_cit.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
zc3xx-reg.h Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00
zc3xx.c Import A536BXXU9EXDC 2024-06-15 16:02:09 -03:00