diff options
author | Rob Taylor <rob.taylor@codethink.co.uk> | 2015-07-23 09:21:43 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2015-08-16 13:28:24 -0300 |
commit | 4284118058b2b4f217a050908a555d0e1ed58641 (patch) | |
tree | eada541bbef5026249ca5e706b9a2d914fc07ef5 /drivers/media | |
parent | 734f3f238587ffb6938700c4495dd5b5a54c4125 (diff) | |
download | linux-4284118058b2b4f217a050908a555d0e1ed58641.tar.gz |
[media] media: rcar_vin: Reject videobufs that are too small for current format
In videobuf_setup reject buffers that are too small for the configured
format. Fixes v4l2-compliance issue.
Signed-off-by: Rob Taylor <rob.taylor@codethink.co.uk>
Reviewed-by: William Towle <william.towle@codethink.co.uk>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/platform/soc_camera/rcar_vin.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/media/platform/soc_camera/rcar_vin.c b/drivers/media/platform/soc_camera/rcar_vin.c index 6abef82b204f..71dd71c0bd1f 100644 --- a/drivers/media/platform/soc_camera/rcar_vin.c +++ b/drivers/media/platform/soc_camera/rcar_vin.c @@ -541,6 +541,9 @@ static int rcar_vin_videobuf_setup(struct vb2_queue *vq, unsigned int bytes_per_line; int ret; + if (fmt->fmt.pix.sizeimage < icd->sizeimage) + return -EINVAL; + xlate = soc_camera_xlate_by_fourcc(icd, fmt->fmt.pix.pixelformat); if (!xlate) |