Commit 0b66cf90 authored by Roel Kluin's avatar Roel Kluin Committed by Mauro Carvalho Chehab

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: default avatarRoel Kluin <roel.kluin@gmail.com>
Acked-by: default avatarMuralidharan Karicheri <m-karicheri2@ti.com>
Signed-off-by: default avatarDouglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 648732fc
...@@ -1577,7 +1577,7 @@ static int vpfe_cropcap(struct file *file, void *priv, ...@@ -1577,7 +1577,7 @@ static int vpfe_cropcap(struct file *file, void *priv,
v4l2_dbg(1, debug, &vpfe_dev->v4l2_dev, "vpfe_cropcap\n"); 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; return -EINVAL;
memset(crop, 0, sizeof(struct v4l2_cropcap)); memset(crop, 0, sizeof(struct v4l2_cropcap));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment