Re: [PATCH 1/1] v4l: ioctl: Validate num_planes for debug messages

2019-01-16 Thread Hans Verkuil
On 1/16/19 2:35 PM, Sasha Levin wrote: > Hi, > > [This is an automated email] > > This commit has been processed because it contains a -stable tag. > The stable tag indicates that it's relevant for the following trees: all > > The bot has tested the following trees: v4.20.2, v4.19.15, v4.14.93,

Re: [PATCH 1/1] v4l: ioctl: Validate num_planes for debug messages

2019-01-10 Thread Thierry Reding
On Thu, Jan 10, 2019 at 04:24:26PM +0200, Sakari Ailus wrote: > 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 > Cc: s

[PATCH 1/1] v4l: ioctl: Validate num_planes for debug messages

2019-01-10 Thread Sakari Ailus
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 Cc: sta...@vger.kernel.org --- drivers/media/v4l2-core/v4l2-ioctl.c | 4 +++-