public inbox for linux-media@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] V4L/DVB: use correct size in put_v4l2_window32()
@ 2009-12-16 14:35 Roel Kluin
  0 siblings, 0 replies; only message in thread
From: Roel Kluin @ 2009-12-16 14:35 UTC (permalink / raw)
  To: Mauro Carvalho Chehab, linux-media, Andrew Morton, LKML

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>
---
diff --git a/drivers/media/video/v4l2-compat-ioctl32.c b/drivers/media/video/v4l2-compat-ioctl32.c
index 997975d..23ad218 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
 
 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))

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2009-12-16 14:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-16 14:35 [PATCH] V4L/DVB: use correct size in put_v4l2_window32() Roel Kluin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox