]> git.baikalelectronics.ru Git - kernel.git/commit
media: vivid: s_fbuf: add more sanity checks
authorHans Verkuil <hverkuil-cisco@xs4all.nl>
Wed, 12 Oct 2022 14:32:28 +0000 (15:32 +0100)
committerMauro Carvalho Chehab <mchehab@kernel.org>
Tue, 25 Oct 2022 15:38:53 +0000 (16:38 +0100)
commit4449856a56042d1e57977c3c8d205d2760796cc3
treef80e490088b1ceabcb0be18d7a5580d6d6cb7c56
parent294e65dd392fa58ea6fb34745e7ea186eacf2e8d
media: vivid: s_fbuf: add more sanity checks

VIDIOC_S_FBUF is by definition a scary ioctl, which is why only root
can use it. But at least check if the framebuffer parameters match that
of one of the framebuffer created by vivid, and reject anything else.

Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Fixes: aa12f8e066f1 ([media] vivid: add the video capture and output parts)
Signed-off-by: Mauro Carvalho Chehab <mchehab@kernel.org>
drivers/media/test-drivers/vivid/vivid-core.c
drivers/media/test-drivers/vivid/vivid-core.h
drivers/media/test-drivers/vivid/vivid-vid-cap.c