]> 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)
commitfcedcc6404dab72fc9d96c58d2f70c00815d652e
treec95c87fd78d06979bca110446286e80a76f9d5d8
parenta97ea8edc0a535eafabe0a038a3ffd58a463fb5c
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