aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/v4l2-compat-ioctl32.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/v4l2-compat-ioctl32.c')
-rw-r--r--drivers/media/video/v4l2-compat-ioctl32.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/media/video/v4l2-compat-ioctl32.c b/drivers/media/video/v4l2-compat-ioctl32.c
index c4150bd26337..f77f84bfe714 100644
--- a/drivers/media/video/v4l2-compat-ioctl32.c
+++ b/drivers/media/video/v4l2-compat-ioctl32.c
@@ -288,7 +288,7 @@ static int get_v4l2_window32(struct v4l2_window *kp, struct v4l2_window32 __user
288 288
289static int put_v4l2_window32(struct v4l2_window *kp, struct v4l2_window32 __user *up) 289static int put_v4l2_window32(struct v4l2_window *kp, struct v4l2_window32 __user *up)
290{ 290{
291 if (copy_to_user(&up->w, &kp->w, sizeof(up->w)) || 291 if (copy_to_user(&up->w, &kp->w, sizeof(kp->w)) ||
292 put_user(kp->field, &up->field) || 292 put_user(kp->field, &up->field) ||
293 put_user(kp->chromakey, &up->chromakey) || 293 put_user(kp->chromakey, &up->chromakey) ||
294 put_user(kp->clipcount, &up->clipcount)) 294 put_user(kp->clipcount, &up->clipcount))
@@ -475,6 +475,9 @@ static int get_v4l2_buffer32(struct v4l2_buffer *kp, struct v4l2_buffer32 __user
475 return -EFAULT; 475 return -EFAULT;
476 switch (kp->memory) { 476 switch (kp->memory) {
477 case V4L2_MEMORY_MMAP: 477 case V4L2_MEMORY_MMAP:
478 if (get_user(kp->length, &up->length) ||
479 get_user(kp->m.offset, &up->m.offset))
480 return -EFAULT;
478 break; 481 break;
479 case V4L2_MEMORY_USERPTR: 482 case V4L2_MEMORY_USERPTR:
480 { 483 {