aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/vimc/vimc-sensor.c
diff options
context:
space:
mode:
authorEzequiel Garcia <[email protected]>2019-02-18 10:25:42 +0000
committerMauro Carvalho Chehab <[email protected]>2019-02-18 15:13:38 +0000
commit14c8e80e68695c2b9342112c39263a79e0963461 (patch)
treeee1fac4cbfa037a96b75d7513e1b8c6b34544b34 /drivers/media/platform/vimc/vimc-sensor.c
parentMerge tag 'v5.0-rc7' into patchwork (diff)
downloadkernel-14c8e80e68695c2b9342112c39263a79e0963461.tar.gz
kernel-14c8e80e68695c2b9342112c39263a79e0963461.zip
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 <[email protected]> Reviewed-by: Sakari Ailus <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
Diffstat (limited to 'drivers/media/platform/vimc/vimc-sensor.c')
0 files changed, 0 insertions, 0 deletions