linux/drivers/staging
Dan Carpenter ca4ce92e3e 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:00:22 +09:00
..
android
axis-fifo
board
clocking-wizard
emxx_udc staging: emxx_udc: Add checks for dma_alloc_coherent() 2023-03-11 13:57:34 +01:00
fbtft
fieldbus staging: fieldbus: Fix the error handling path in anybuss_host_common_probe() 2022-06-14 18:36:04 +02:00
fwserial
gdm724x
greybus staging: greybus: audio_helper: remove unused and wrong debugfs usage 2022-10-26 12:34:34 +02:00
gs_fpgaboot
iio staging: iio: resolver: ads1210: fix config mode 2023-05-11 23:00:16 +09:00
ks7010
media media: av7110: prevent underflow in write_ts_to_decoder() 2023-05-11 23:00:22 +09:00
most
mt7621-dma
mt7621-dts staging: mt7621-dts: change palmbus address to lower case 2023-03-03 11:45:53 +01:00
mt7621-pci PCI: mt7621: Add sentinel to quirks table 2022-12-31 13:14:26 +01:00
netlogic
nvec
octeon
octeon-usb
olpc_dcon
pi433
qlge
r8188eu staging: r8188eu: Add Rosewill USB-N150 Nano to device tables 2022-09-28 11:11:38 +02:00
ralink-gdma
rtl8192e staging: rtl8192e: Remove call_usermodehelper starting RadioPower.sh 2023-03-13 10:20:37 +01:00
rtl8192u staging: rtl8192u: Fix use after free in ieee80211_rx() 2022-12-31 13:14:30 +01:00
rtl8712 staging: rtl8712: fix use after free bugs 2022-09-08 12:28:03 +02:00
rtl8723bs staging: rtl8723bs: Fix key-store index handling 2023-03-17 08:48:59 +01:00
rts5208
sm750fb
unisys
vc04_services staging: vchiq_arm: fix enum vchiq_status return types 2023-01-24 07:22:45 +01:00
vme
vt6655 staging: vt6655: fix potential memory leak 2022-10-26 12:35:47 +02:00
vt6656
wfx
wlan-ng
Kconfig
Makefile