patch-2.2.16 linux/drivers/char/n_tty.c
Next file: linux/drivers/char/nvram.c
Previous file: linux/drivers/char/n_hdlc.c
Back to the patch index
Back to the overall index
- Lines: 13
- Date:
Wed Jun 7 14:26:42 2000
- Orig file:
v2.2.15/linux/drivers/char/n_tty.c
- Orig date:
Wed May 3 17:16:38 2000
diff -urN v2.2.15/linux/drivers/char/n_tty.c linux/drivers/char/n_tty.c
@@ -228,9 +228,9 @@
nr = space;
if (nr > sizeof(buf))
nr = sizeof(buf);
- nr -= copy_from_user(buf, inbuf, nr);
- if (!nr)
- return 0;
+
+ if (copy_from_user(buf, inbuf, nr))
+ return -EFAULT;
for (i = 0, cp = buf; i < nr; i++, cp++) {
switch (*cp) {
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)