On 06/03/2015 04:00 PM, William Towle wrote: > From: Rob Taylor <rob.tay...@codethink.co.uk> > > In videobuf_setup reject buffers that are too small for the configured > format. Fixes v4l2-complience issue. > > Signed-off-by: Rob Taylor <rob.tay...@codethink.co.uk> > Reviewed-by: William Towle <william.to...@codethink.co.uk>
Acked-by: Hans Verkuil <hans.verk...@cisco.com> Thanks, Hans > --- > drivers/media/platform/soc_camera/rcar_vin.c | 3 +++ > 1 file changed, 3 insertions(+) > > diff --git a/drivers/media/platform/soc_camera/rcar_vin.c > b/drivers/media/platform/soc_camera/rcar_vin.c > index cc993bc..1531a76 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) > -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html