diff options
author | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2018-03-28 15:12:37 -0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2018-04-08 11:49:47 +0200 |
commit | 30fb2960e073cc3bf9985b59ca1337ab98d396e9 (patch) | |
tree | 75ce9ab078f27617e168c224c2cf41ff2af15cfe /drivers/media | |
parent | 6a2185e29ebfaa760887c5185917bb240f5e983d (diff) | |
download | linux-stable-30fb2960e073cc3bf9985b59ca1337ab98d396e9.tar.gz linux-stable-30fb2960e073cc3bf9985b59ca1337ab98d396e9.tar.bz2 linux-stable-30fb2960e073cc3bf9985b59ca1337ab98d396e9.zip |
media: v4l2-compat-ioctl32: initialize a reserved field
The get_v4l2_create32() function is missing a logic with
would be cleaning a reserved field, causing v4l2-compliance
to complain:
Buffer ioctls (Input 0):
fail: v4l2-test-buffers.cpp(506): check_0(crbufs.reserved, sizeof(crbufs.reserved))
test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: FAIL
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/v4l2-core/v4l2-compat-ioctl32.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/v4l2-core/v4l2-compat-ioctl32.c b/drivers/media/v4l2-core/v4l2-compat-ioctl32.c index c76438dd3ead..ca0a43ad4ec8 100644 --- a/drivers/media/v4l2-core/v4l2-compat-ioctl32.c +++ b/drivers/media/v4l2-core/v4l2-compat-ioctl32.c @@ -247,7 +247,8 @@ static int get_v4l2_create32(struct v4l2_create_buffers __user *kp, { if (!access_ok(VERIFY_READ, up, sizeof(*up)) || copy_in_user(kp, up, - offsetof(struct v4l2_create_buffers32, format))) + offsetof(struct v4l2_create_buffers32, format)) || + copy_in_user(kp->reserved, up->reserved, sizeof(kp->reserved))) return -EFAULT; return __get_v4l2_format32(&kp->format, &up->format, aux_buf, aux_space); |