linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [CHECKER][PATCH] bw-qcam.c bad copy_to_user
@ 2003-06-03 15:55 Hollis Blanchard
  0 siblings, 0 replies; only message in thread
From: Hollis Blanchard @ 2003-06-03 15:55 UTC (permalink / raw)
  To: Linus Torvalds; +Cc: linux-kernel

[-- Attachment #1: Type: text/plain, Size: 242 bytes --]

Like radio-cadet.c, bw-qcam.c is calling copy_to_user() where it 
shouldn't. The user buffer is copied to/from kernel space by 
drivers/media/video/videodev.c:video_usercopy() . Please apply.

-- 
Hollis Blanchard
IBM Linux Technology Center

[-- Attachment #2: bwqcam-copy_to_user.txt --]
[-- Type: text/plain, Size: 426 bytes --]

===== drivers/media/video/bw-qcam.c 1.11 vs edited =====
--- 1.11/drivers/media/video/bw-qcam.c	Sun Feb 16 18:16:53 2003
+++ edited/drivers/media/video/bw-qcam.c	Tue Jun  3 10:28:29 2003
@@ -723,8 +723,6 @@
 			/* Good question.. its composite or SVHS so.. */
 			v->type = VIDEO_TYPE_CAMERA;
 			strcpy(v->name, "Camera");
-			if(copy_to_user(arg, &v, sizeof(v)))
-				return -EFAULT;
 			return 0;
 		}
 		case VIDIOCSCHAN:

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

only message in thread, other threads:[~2003-06-03 15:42 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-06-03 15:55 [CHECKER][PATCH] bw-qcam.c bad copy_to_user Hollis Blanchard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).