Skip to content

Commit

Permalink
V4L/DVB (4862): Fixes uninitialized variables passed to VIDIOC_G_FBUF.
Browse files Browse the repository at this point in the history
Signed-off-by: Andrea A Odetti <audetto@tiscali.it>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
  • Loading branch information
audetto@tiscali.it authored and Mauro Carvalho Chehab committed Dec 10, 2006
1 parent e75f9ce commit 499c186
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/media/video/v4l1-compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,7 @@ v4l_compat_translate_ioctl(struct inode *inode,
struct video_buffer *buffer = arg;

memset(buffer, 0, sizeof(*buffer));
memset(&fbuf2, 0, sizeof(fbuf2));

err = drv(inode, file, VIDIOC_G_FBUF, &fbuf2);
if (err < 0) {
Expand Down Expand Up @@ -616,6 +617,7 @@ v4l_compat_translate_ioctl(struct inode *inode,
case VIDIOCSPICT: /* set tone controls & partial capture format */
{
struct video_picture *pict = arg;
memset(&fbuf2, 0, sizeof(fbuf2));

set_v4l_control(inode, file,
V4L2_CID_BRIGHTNESS, pict->brightness, drv);
Expand Down

0 comments on commit 499c186

Please sign in to comment.