patch-pre2.0.13 linux/drivers/char/selection.c

Next file: linux/drivers/char/serial.c
Previous file: linux/drivers/char/random.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file pre2.0.12/linux/drivers/char/selection.c linux/drivers/char/selection.c
@@ -123,6 +123,10 @@
 
 	  args = (unsigned short *)(arg + 1);
 	  if (user) {
+	  	  int err;
+		  err = verify_area(VERIFY_READ, args, sizeof(short) * 5);
+		  if (err)
+		  	return err;
 		  xs = get_user(args++) - 1;
 		  ys = get_user(args++) - 1;
 		  xe = get_user(args++) - 1;

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this