mirror-linux/drivers/staging
Dan Carpenter 423350af9e media: av7110: prevent underflow in write_ts_to_decoder()
[ Upstream commit eed9496a05 ]

The buf[4] value comes from the user via ts_play().  It is a value in
the u8 range.  The final length we pass to av7110_ipack_instant_repack()
is "len - (buf[4] + 1) - 4" so add a check to ensure that the length is
not negative.  It's not clear that passing a negative len value does
anything bad necessarily, but it's not best practice.

With the new bounds checking the "if (!len)" condition is no longer
possible or required so remove that.

Fixes: fd46d16d60 ("V4L/DVB (11759): dvb-ttpci: Add TS replay capability")
Signed-off-by: Dan Carpenter <error27@gmail.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-05-11 23:03:10 +09:00
..
axis-fifo
board
emxx_udc staging: emxx_udc: Add checks for dma_alloc_coherent() 2023-03-11 13:55:34 +01:00
fbtft staging: fbtft: core: set smem_len before fb_deferred_io_init call 2022-07-28 10:42:42 +02:00
fieldbus
gdm724x staging: gdm724x: drop unused CDC defines 2022-07-25 10:57:42 +02:00
greybus Staging driver changes for 6.1-rc1 2022-10-08 09:19:24 -07:00
iio staging: iio: resolver: ads1210: fix config mode 2023-05-11 23:03:01 +09:00
ks7010
media media: av7110: prevent underflow in write_ts_to_decoder() 2023-05-11 23:03:10 +09:00
most i2c: Make remove callback return void 2022-08-16 12:46:26 +02:00
nvec
octeon staging: octeon: Fix return type of cvm_oct_xmit and cvm_oct_xmit_pow 2022-09-24 13:07:31 +02:00
olpc_dcon i2c: Make remove callback return void 2022-08-16 12:46:26 +02:00
pi433 staging: pi433: fix memory leak with using debugfs_lookup() 2023-03-11 13:55:36 +01:00
qlge net: drop the weight argument from netif_napi_add 2022-09-28 18:57:14 -07:00
r8188eu drivers: staging: r8188eu: Fix sleep-in-atomic-context bug in rtw_join_timeout_handler 2022-12-31 13:32:38 +01:00
rtl8192e staging: rtl8192e: Remove call_usermodehelper starting RadioPower.sh 2023-03-13 10:21:31 +01:00
rtl8192u staging: rtl8192u: Fix use after free in ieee80211_rx() 2022-12-31 13:32:42 +01:00
rtl8712 staging: rtl8712: Fix return type for implementation of ndo_start_xmit 2022-09-09 09:55:24 +02:00
rtl8723bs staging: rtl8723bs: Pass correct parameters to cfg80211_get_bss() 2023-03-17 08:50:16 +01:00
rts5208
sm750fb Staging driver changes for 6.1-rc1 2022-10-08 09:19:24 -07:00
vc04_services staging: vchiq_arm: fix enum vchiq_status return types 2023-01-24 07:24:35 +01:00
vme_user vme: Fix error not catched in fake_init() 2022-12-31 13:32:42 +01:00
vt6655 staging: vt6655: fix some erroneous memory clean-up loops 2022-09-24 13:05:24 +02:00
vt6656
wlan-ng Staging driver changes for 6.1-rc1 2022-10-08 09:19:24 -07:00
Kconfig Here's the main clk pull request for this merge window. We have some 2022-10-08 10:06:48 -07:00
Makefile Here's the main clk pull request for this merge window. We have some 2022-10-08 10:06:48 -07:00