Re: [PATCH] media: v4l: ioctl: Sanitize num_planes before using it

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux