summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Verkuil <hverkuil@xs4all.nl>2009-01-19 10:14:17 +0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-30 19:42:24 +0400
commitf97d2074e364d51dde91d2a94a262466815d13ce (patch)
treebe85cd38eac038c6c2c6f1980ec5ee5867a93f25
parentb960074fec573fb1b226d9e2686ce51be807cdf1 (diff)
downloadlinux-f97d2074e364d51dde91d2a94a262466815d13ce.tar.xz
V4L/DVB (10272): av7110: test type field in VIDIOC_G_SLICED_VBI_CAP
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
-rw-r--r--drivers/media/dvb/ttpci/av7110_v4l.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/dvb/ttpci/av7110_v4l.c b/drivers/media/dvb/ttpci/av7110_v4l.c
index 04334058f8f8..2210cff738e6 100644
--- a/drivers/media/dvb/ttpci/av7110_v4l.c
+++ b/drivers/media/dvb/ttpci/av7110_v4l.c
@@ -519,7 +519,8 @@ static int vidioc_g_sliced_vbi_cap(struct file *file, void *fh,
struct av7110 *av7110 = (struct av7110 *)dev->ext_priv;
dprintk(2, "VIDIOC_G_SLICED_VBI_CAP\n");
- memset(cap, 0, sizeof(*cap));
+ if (cap->type != V4L2_BUF_TYPE_SLICED_VBI_OUTPUT)
+ return -EINVAL;
if (FW_VERSION(av7110->arm_app) >= 0x2623) {
cap->service_set = V4L2_SLICED_WSS_625;
cap->service_lines[0][23] = V4L2_SLICED_WSS_625;