linux/drivers/media
Dan Carpenter b00481bdca media: camss: Fix signedness bug in video_enum_fmt()
This test has a problem because we want to know if "k" is -1 or a
positive value less than "f->index".  But the "f->index" variable is a
u32 so if "k == -1" then -1 gets type promoted to UINT_MAX which is
larger than "f->index".  I've added an explicit test to check for -1.

Fixes: a3d412d4b9 ("media: Revert "media: camss: Make use of V4L2_CAP_IO_MC"")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Reviewed-by: Robert Foss <robert.foss@linaro.org>
Reviewed-by: Andrey Konovalov <andrey.konovalov@linaro.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2021-01-12 18:14:48 +01:00
..
cec media: cec: add EPOLLPRI in poll() when dev is unregistered 2021-01-04 13:16:48 +01:00
common media: videobuf2: always call poll_wait() on queues 2021-01-04 13:12:46 +01:00
dvb-core media: dvbdev: Fix memleak in dvb_register_device 2020-11-17 06:57:54 +01:00
dvb-frontends media: Replace HTTP links with HTTPS ones: SI2165 MEDIA DRIVER 2020-11-27 13:05:07 +01:00
firewire media: firewire: fix memory leak 2020-09-27 11:29:45 +02:00
i2c media: ccs: Small definition cleanup 2021-01-12 17:57:08 +01:00
mc media: mc-device.c: change media_device_request_alloc to match media_ioctl_info 2020-08-29 08:15:23 +02:00
mmc media updates for v5.8-rc1 2020-06-03 20:59:38 -07:00
pci media: ipu3-cio2: Fix mbus_code processing in cio2_subdev_set_fmt() 2021-01-12 17:09:57 +01:00
platform media: camss: Fix signedness bug in video_enum_fmt() 2021-01-12 18:14:48 +01:00
radio media: si4713: remove trailing semicolon in macro definition 2020-12-03 08:54:13 +01:00
rc media updates for v5.11-rc1 2020-12-14 11:47:37 -08:00
spi media: i2c/Kconfig: use sub-menus for I2C support 2020-04-16 10:34:40 +02:00
test-drivers media: vivid: call v4l2_event_wake_all() on disconnect 2021-01-04 13:15:47 +01:00
tuners media: tuners: reduce stack usage in mxl5005s_reconfigure 2020-11-27 13:47:42 +01:00
usb media: gspca: Fix memory leak in probe 2020-12-07 15:00:15 +01:00
v4l2-core media: v4l: ioctl: Use kmalloc to allocate a small chunk of memory 2021-01-12 17:06:58 +01:00
Kconfig media: Remove superfluous dependency for MEDIA_SUPPORT_FILTER 2020-11-27 12:19:25 +01:00
Makefile media: media/test_drivers: rename to test-drivers 2020-04-16 10:38:31 +02:00