diff options
| author | Ezequiel Garcia <[email protected]> | 2019-02-18 10:25:42 +0000 |
|---|---|---|
| committer | Mauro Carvalho Chehab <[email protected]> | 2019-02-18 15:13:38 +0000 |
| commit | 14c8e80e68695c2b9342112c39263a79e0963461 (patch) | |
| tree | ee1fac4cbfa037a96b75d7513e1b8c6b34544b34 /drivers/media/platform/vimc/vimc-sensor.c | |
| parent | Merge tag 'v5.0-rc7' into patchwork (diff) | |
| download | kernel-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
