diff options
author | Laurent Pinchart <laurent.pinchart@skynet.be> | 2009-06-04 09:26:39 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-06-16 19:07:30 -0300 |
commit | 23ff6043add670713bbf2f6ee5d520459cfdfae9 (patch) | |
tree | b275b1baf5e1f9940b27e388784ed999ab1c6e93 /drivers/media/video/uvc/uvc_v4l2.c | |
parent | d732c44c1a4b54e3c59ad92069bc2fd848aca5f3 (diff) |
V4L/DVB (11945): uvcvideo: Don't accept to change the format when buffers are allocated.
Setting a new frame format or size will likely change the buffer size required
to store a complete video frame. To avoid a buffer overflow, don't allow
VIDIOC_S_FMT calls when video buffers are already allocated.
Signed-off-by: Laurent Pinchart <laurent.pinchart@skynet.be>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/uvc/uvc_v4l2.c')
-rw-r--r-- | drivers/media/video/uvc/uvc_v4l2.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/video/uvc/uvc_v4l2.c b/drivers/media/video/uvc/uvc_v4l2.c index 507542dcbda..f8b94d608a1 100644 --- a/drivers/media/video/uvc/uvc_v4l2.c +++ b/drivers/media/video/uvc/uvc_v4l2.c @@ -251,7 +251,7 @@ static int uvc_v4l2_set_format(struct uvc_video_device *video, if (fmt->type != video->streaming->type) return -EINVAL; - if (uvc_queue_streaming(&video->queue)) + if (uvc_queue_allocated(&video->queue)) return -EBUSY; ret = uvc_v4l2_try_format(video, fmt, &probe, &format, &frame); |