[PATCH] drivers/media/video/arv.c: fix memset in ioctl

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Mariusz Kozlowski
Date: Monday, August 6, 2007 - 1:09 pm

Hello,

	Looks like memset() is zeroing wrong nr of bytes.

Signed-off-by: Mariusz Kozlowski <m.kozlowski@tuxland.pl>

 drivers/media/video/arv.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-2.6.23-rc1-mm2-a/drivers/media/video/arv.c	2007-08-01 08:43:47.000000000 +0200
+++ linux-2.6.23-rc1-mm2-b/drivers/media/video/arv.c	2007-08-06 20:36:00.000000000 +0200
@@ -441,7 +441,7 @@ static int ar_do_ioctl(struct inode *ino
 	{
 		struct video_window *w = arg;
 		DEBUG(1, "VIDIOCGWIN:\n");
-		memset(w, 0, sizeof(w));
+		memset(w, 0, sizeof(*w));
 		w->width = ar->width;
 		w->height = ar->height;
 		return 0;
-
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] drivers/media/video/arv.c: fix memset in ioctl, Mariusz Kozlowski, (Mon Aug 6, 1:09 pm)