linux/drivers/media
Dan Carpenter 3b5af3171e media: cec: silence shift wrapping warning in __cec_s_log_addrs()
The log_addrs->log_addr_type[i] value is a u8 which is controlled by
the user and comes from the ioctl.  If it's over 31 then that results in
undefined behavior (shift wrapping) and that leads to a Smatch static
checker warning.  We already cap the value later so we can silence the
warning just by re-ordering the existing checks.

I think the UBSan checker will also catch this bug at runtime and
generate a warning.  But otherwise the bug is harmless.

Fixes: 9881fe0ca1 ("[media] cec: add HDMI CEC framework (adapter)")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
2020-05-05 17:27:03 +02:00
..
cec media: cec: silence shift wrapping warning in __cec_s_log_addrs() 2020-05-05 17:27:03 +02:00
common media: dvb-usb: auto-select CYPRESS_FIRMWARE 2020-04-14 10:29:04 +02:00
dvb-core media: Kconfig: move DVB-specific options to dvb-core/Kconfig 2020-04-14 10:29:05 +02:00
dvb-frontends media: m88ds3103: error in set_frontend is swallowed and not reported 2020-04-29 11:58:27 +02:00
firewire media: Kconfig: mode firewire comment to firewire/Kconfig 2020-04-14 10:29:04 +02:00
i2c media: cx25840: Register labeling, chip specific correction 2020-04-21 16:51:27 +02:00
mc media: mc/Kconfig: remove staging dependency for request API 2020-04-17 08:57:39 +02:00
mmc media: Kconfig: move comment to siano include 2020-04-14 10:29:04 +02:00
pci media: cx23885: Add i2c device analog tuner support 2020-04-21 16:49:21 +02:00
platform media: sun8i: Fix an error handling path in 'deinterlace_runtime_resume()' 2020-05-05 17:26:26 +02:00
radio media: radio: don't use a menu just for wl128x driver 2020-04-16 10:34:57 +02:00
rc media: rc: no need for decoder state if decoder not enabled 2020-04-29 11:59:20 +02:00
spi media: i2c/Kconfig: use sub-menus for I2C support 2020-04-16 10:34:40 +02:00
test-drivers media: vimc: deb: Add support for {RGB,BGR,GBR}888 bus formats on source pad 2020-05-05 17:26:04 +02:00
tuners media: si2157: ensure wait_status is initialized 2020-04-29 11:59:57 +02:00
usb media: cx231xx: Remove unneeded semicolon 2020-05-05 17:09:04 +02:00
v4l2-core media: v4l2-ctrls: add __v4l2_ctrl_s_ctrl_compound() 2020-04-21 17:01:07 +02:00
Kconfig media: media/test_drivers: rename to test-drivers 2020-04-16 10:38:31 +02:00
Makefile media: media/test_drivers: rename to test-drivers 2020-04-16 10:38:31 +02:00