Skip to contentSkip to conversation

V4L/DVB: use correct size in put_v4l2_window32()

PATCH New Roel Kluin 1 participant 1 message Dec 16, 2009 Media (V4L/DVB)

lore
Share & tools
lore

Roel Kluin

author
#0 lore raw

PATCH 1/1 V4L/DVB: use correct size in put_v4l2_window32()

Although these sizes may be the same it is better to calculate the size of the source, than the destiny.

---

drivers/media/video/v4l2-compat-ioctl32.c +1 -1
index 997975d..23ad218 100644
@@ -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))