mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
V4L/DVB (13285): vpfe_capture: keep index within bound in vpfe_cropcap()
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>
This commit is contained in:
parent
648732fcef
commit
0b66cf9037
1 changed files with 1 additions and 1 deletions
|
@ -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));
|
||||
|
|
Loading…
Add table
Reference in a new issue