summaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorDan Carpenter <error27@gmail.com>2023-03-07 11:00:23 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2023-05-17 11:11:40 +0200
commit6680af5be9f08d830567e9118f76d3e64684db8f (patch)
tree12300ae15d2de1b042d5033b582464058186db21 /arch/x86
parentfc1aeafdf6fb0a136c2257000f0d478ee62953fe (diff)
downloadlinux-stable-6680af5be9f08d830567e9118f76d3e64684db8f.tar.gz
linux-stable-6680af5be9f08d830567e9118f76d3e64684db8f.tar.bz2
linux-stable-6680af5be9f08d830567e9118f76d3e64684db8f.zip
media: av7110: prevent underflow in write_ts_to_decoder()
[ Upstream commit eed9496a0501357aa326ddd6b71408189ed872eb ] 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: fd46d16d602a ("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>
Diffstat (limited to 'arch/x86')
0 files changed, 0 insertions, 0 deletions