]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.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)
committerStefan Bader <stefan.bader@canonical.com>
Fri, 20 May 2022 13:18:40 +0000 (15:18 +0200)
commitd94c32f6fb47b5fb96373cec9d31c206bc2e823b
tree82d0479c00d17e27f10eeaaa637abf472f8eb4c8
parent3c0919eacda5042a867f758400db6a76b010ac51
media: video/hdmi: handle short reads of hdmi info frame.

BugLink: https://bugs.launchpad.net/bugs/1971497
[ 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>
Signed-off-by: Kamal Mostafa <kamal@canonical.com>
Signed-off-by: Stefan Bader <stefan.bader@canonical.com>
drivers/media/i2c/adv7511-v4l2.c
drivers/media/i2c/adv7604.c
drivers/media/i2c/adv7842.c