diff options
| author | Dmitry Shmidt <dimitrysh@google.com> | 2016-10-21 13:44:21 -0700 |
|---|---|---|
| committer | Dmitry Shmidt <dimitrysh@google.com> | 2016-10-21 13:50:06 -0700 |
| commit | 59fc70469aed3259e9deda4420031459a4f985c8 (patch) | |
| tree | f4ddfed6b5b470b95567256b8450fe6d4a0dedb0 /lib/strncpy_from_user.c | |
| parent | b8fa4a3ee5972568ce10d8b23cc314b773381002 (diff) | |
| parent | 4a8b645cef3caa87b85269078d9e1f02115107b6 (diff) | |
Merge remote-tracking branch 'common/android-4.4' into android-4.4.y
Change-Id: I8c5ec371d8b612f6880b2428893bec89d7da71f6
Diffstat (limited to 'lib/strncpy_from_user.c')
| -rw-r--r-- | lib/strncpy_from_user.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/strncpy_from_user.c b/lib/strncpy_from_user.c index 5a003a2ebd96..05efc1fa97f0 100644 --- a/lib/strncpy_from_user.c +++ b/lib/strncpy_from_user.c @@ -1,5 +1,6 @@ #include <linux/compiler.h> #include <linux/export.h> +#include <linux/thread_info.h> #include <linux/uaccess.h> #include <linux/kernel.h> #include <linux/errno.h> @@ -109,6 +110,7 @@ long strncpy_from_user(char *dst, const char __user *src, long count) unsigned long max = max_addr - src_addr; long retval; + check_object_size(dst, count, false); user_access_begin(); retval = do_strncpy_from_user(dst, src, count, max); user_access_end(); |
