media: cros-ec-cec: limit msg.len to CEC_MAX_MSG_SIZE
authorHans Verkuil <hverkuil-cisco@xs4all.nl>
Wed, 24 Aug 2022 07:06:19 +0000 (09:06 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Nov 2022 17:15:33 +0000 (18:15 +0100)
commit73dfb64213381d0a63041af440f6d4aaacdbb4da
tree4546fd582c7a6c83d68d0af529ad98d964091fb0
parentcbfa26936f318b16ccf9ca31b8e8b30c0dc087bd
media: cros-ec-cec: limit msg.len to CEC_MAX_MSG_SIZE

[ Upstream commit 2dc73b48665411a08c4e5f0f823dea8510761603 ]

I expect that the hardware will have limited this to 16, but just in
case it hasn't, check for this corner case.

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/cec/platform/cros-ec/cros-ec-cec.c