patch-2.1.6 linux/drivers/isdn/teles/callc.c

Next file: linux/drivers/isdn/teles/card.c
Previous file: linux/drivers/isdn/isdn_tty.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.5/linux/drivers/isdn/teles/callc.c linux/drivers/isdn/teles/callc.c
@@ -1450,9 +1450,10 @@
 
         ptr += i;
 
-        if (user)
-                memcpy_fromfs(ptr, buf, count);
-        else
+        if (user) {
+                if (copy_from_user(ptr, buf, count))
+					return -EFAULT;
+		} else
                 memcpy(ptr, buf, count);
         ibh->datasize = count + i;
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov