V4L/DVB: use correct size in put_v4l2_window32()
authorRoel Kluin <roel.kluin@gmail.com>
Wed, 16 Dec 2009 14:35:45 +0000 (11:35 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Fri, 26 Feb 2010 18:10:32 +0000 (15:10 -0300)
Although these sizes may be the same it is better to calculate the size of
the source, than the destiny.

Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/v4l2-compat-ioctl32.c

index c4150bd263371484abdb0f094319b1bff5649428..dc7b8c23eac0662fe4498f3f622115d53c5e3533 100644 (file)
@@ -288,7 +288,7 @@ static int get_v4l2_window32(struct v4l2_window *kp, struct v4l2_window32 __user
 
 static int put_v4l2_window32(struct v4l2_window *kp, struct v4l2_window32 __user *up)
 {
-       if (copy_to_user(&up->w, &kp->w, sizeof(up->w)) ||
+       if (copy_to_user(&up->w, &kp->w, sizeof(kp->w)) ||
                put_user(kp->field, &up->field) ||
                put_user(kp->chromakey, &up->chromakey) ||
                put_user(kp->clipcount, &up->clipcount))