patch-pre2.0.6 linux/drivers/char/pcxx.c

Next file: linux/drivers/isdn/Config.in
Previous file: linux/drivers/char/README.baycom
Back to the patch index
Back to the overall index

diff -u --recursive --new-file pre2.0.5/linux/drivers/char/pcxx.c linux/drivers/char/pcxx.c
@@ -1868,6 +1868,9 @@
 			return 0;
 
 		case TIOCSSOFTCAR:
+			error = verify_area(VERIFY_READ, (void *) arg,sizeof(long));
+			if(error)
+				return error;
 			arg = get_fs_long((unsigned long *) arg);
 			tty->termios->c_cflag =	((tty->termios->c_cflag & ~CLOCAL) | (arg ? CLOCAL : 0));
 			return 0;
@@ -1905,6 +1908,9 @@
 		case TIOCMBIC:
 		case TIOCMODS:
 		case TIOCMSET:
+			error = verify_area(VERIFY_READ, (void *) arg,sizeof(long));
+			if(error)
+				return error;
 			mstat = get_fs_long((unsigned long *) arg);
 
 			mflag = 0;

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