Linux/linux 7fe9f01drivers/media/v4l2-core v4l2-ioctl.c

media: v4l: ioctl: Validate num_planes for debug messages

The num_planes field in struct v4l2_pix_format_mplane is used in a loop
before validating it. As the use is printing a debug message in this case,
just cap the value to the maximum allowed.

Signed-off-by: Sakari Ailus <sakari.ailus at linux.intel.com>
Cc: stable at vger.kernel.org
Reviewed-by: Thierry Reding <treding at nvidia.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco at xs4all.nl>
Cc: <stable at vger.kernel.org>      # for v4.12 and up
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung at kernel.org>
DeltaFile
+3-1drivers/media/v4l2-core/v4l2-ioctl.c
+3-11 files

UnifiedSplitRaw