[media] v4l2-event: Deny subscribing with a type of V4L2_EVENT_ALL
Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
60659dd495
commit
b36b505965
@ -215,6 +215,9 @@ int v4l2_event_subscribe(struct v4l2_fh *fh,
|
||||
unsigned long flags;
|
||||
unsigned i;
|
||||
|
||||
if (sub->type == V4L2_EVENT_ALL)
|
||||
return -EINVAL;
|
||||
|
||||
if (elems < 1)
|
||||
elems = 1;
|
||||
if (sub->type == V4L2_EVENT_CTRL) {
|
||||
|
Loading…
Reference in New Issue
Block a user