patch-2.1.118 linux/include/asm-arm/uaccess.h
Next file: linux/include/asm-i386/fcntl.h
Previous file: linux/include/asm-alpha/posix_types.h
Back to the patch index
Back to the overall index
- Lines: 13
- Date:
Mon Aug 24 12:29:35 1998
- Orig file:
v2.1.117/linux/include/asm-arm/uaccess.h
- Orig date:
Tue Jan 20 16:39:43 1998
diff -u --recursive --new-file v2.1.117/linux/include/asm-arm/uaccess.h linux/include/asm-arm/uaccess.h
@@ -60,8 +60,11 @@
static __inline__ unsigned long copy_from_user(void *to, const void *from, unsigned long n)
{
- if (access_ok(VERIFY_READ, from, n))
+ char *end = (char *)to + n;
+ if (access_ok(VERIFY_READ, from, n)) {
__do_copy_from_user(to, from, n);
+ if (n) memset(end - n, 0, n);
+ }
return n;
}
FUNET's LINUX-ADM group, [email protected]
TCL-scripts by Sam Shen, [email protected]