mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
[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 <[email protected]> Reviewed-by: William Towle <[email protected]> Signed-off-by: Hans Verkuil <[email protected]> Signed-off-by: Mauro Carvalho Chehab <[email protected]>
This commit is contained in:
parent
734f3f2385
commit
4284118058
1 changed files with 3 additions and 0 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue