Hi Ezequiel, On Mon, Feb 18, 2019 at 07:25:42AM -0300, Ezequiel Garcia wrote: > The linked commit changed s_fmt/try_fmt to fail if num_planes is bogus. > This, however, is against the spec, which mandates drivers > to return a proper num_planes value, without an error. > > Replace the num_planes check and instead clamp it to a sane value, > so we still make sure we don't overflow the planes array by accident. > > Fixes: 9048b2e15b11c5 ("media: v4l: ioctl: Validate num_planes before using it") > Signed-off-by: Ezequiel Garcia <ezequiel@xxxxxxxxxxxxx> Reviewed-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx> -- Sakari Ailus