]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
media: video/hdmi: handle short reads of hdmi info frame.
authorTom Rix <trix@redhat.com>
Thu, 12 Aug 2021 17:01:46 +0000 (19:01 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 8 Apr 2022 11:57:47 +0000 (13:57 +0200)
commit5f276c3bfe03b40f2984a0f9bf69efd076f71858
tree477bf4ae1726920d0b8e4a49b9a2881ce5b0e9dd
parent512cb273e1523d7624765dea8161ee79e1fe712e
media: video/hdmi: handle short reads of hdmi info frame.

[ Upstream commit 4a92fc6e55da5b87cecb572275deaff6ac9dd27e ]

Calling hdmi_infoframe_unpack() with static sizeof(buffer) skips all
the size checking done later in hdmi_infoframe_unpack().  A better
value is the amount of data read into buffer.

Fixes: 480b8b3e42c3 ("video/hdmi: Pass buffer size to infoframe unpack functions")
Signed-off-by: Tom Rix <trix@redhat.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>
drivers/media/i2c/adv7511-v4l2.c
drivers/media/i2c/adv7604.c
drivers/media/i2c/adv7842.c