summaryrefslogtreecommitdiff
path: root/drivers/gpio
diff options
context:
space:
mode:
authorEzequiel Garcia <ezequiel@collabora.com>2019-02-18 05:25:42 -0500
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2019-02-18 10:13:38 -0500
commit14c8e80e68695c2b9342112c39263a79e0963461 (patch)
treeee1fac4cbfa037a96b75d7513e1b8c6b34544b34 /drivers/gpio
parent5f09bc8cc4010a3ea17c5881a62fc45192ebe7b0 (diff)
media: v4l: ioctl: Sanitize num_planes before using it
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@collabora.com> Reviewed-by: Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/gpio')
0 files changed, 0 insertions, 0 deletions