]> git.baikalelectronics.ru Git - kernel.git/commit
media: imx-jpeg: Fix potential array out of bounds in queue_setup
authorMirela Rabulea <mirela.rabulea@oss.nxp.com>
Tue, 8 Mar 2022 13:16:57 +0000 (14:16 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Fri, 13 May 2022 09:02:17 +0000 (11:02 +0200)
commit859936b7440b46395b87a8546f4dd11bf42dd71b
treec95c87fd78d06979bca110446286e80a76f9d5d8
parent60edaf2e4ecfc630d4d092da2233a28027f50a86
media: imx-jpeg: Fix potential array out of bounds in queue_setup

Fix smatch warning in mxc_jpeg_queue_setup, check *nplanes against
current format:

drivers/media/platform/imx-jpeg/mxc-jpeg.c:1070
mxc_jpeg_queue_setup()
         warn: potential user controlled iterator 'i' (array size 2 vs 7)

Signed-off-by: Mirela Rabulea <mirela.rabulea@oss.nxp.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/platform/nxp/imx-jpeg/mxc-jpeg.c