Skip to content

Commit

Permalink
V4L/DVB (13285): vpfe_capture: keep index within bound in vpfe_cropcap()
Browse files Browse the repository at this point in the history
If vpfe_dev->std_index equals ARRAY_SIZE(vpfe_standards), that is
one too large.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Muralidharan Karicheri <m-karicheri2@ti.com>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
  • Loading branch information
Roel Kluin authored and Mauro Carvalho Chehab committed Dec 5, 2009
1 parent 648732f commit 0b66cf9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/media/video/davinci/vpfe_capture.c
Original file line number Diff line number Diff line change
Expand Up @@ -1577,7 +1577,7 @@ static int vpfe_cropcap(struct file *file, void *priv,

v4l2_dbg(1, debug, &vpfe_dev->v4l2_dev, "vpfe_cropcap\n");

if (vpfe_dev->std_index > ARRAY_SIZE(vpfe_standards))
if (vpfe_dev->std_index >= ARRAY_SIZE(vpfe_standards))
return -EINVAL;

memset(crop, 0, sizeof(struct v4l2_cropcap));
Expand Down

0 comments on commit 0b66cf9

Please sign in to comment.