new helper: memdup_user_nul()

Similar to memdup_user(), except that allocated buffer is one byte
longer and '\0' is stored after the copied data.

Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
Al Viro
2015-12-24 00:06:05 -05:00
parent 74bf8efb5f
commit e9d408e107
2 changed files with 32 additions and 0 deletions

View File

@@ -10,6 +10,7 @@
extern char *strndup_user(const char __user *, long);
extern void *memdup_user(const void __user *, size_t);
extern void *memdup_user_nul(const void __user *, size_t);
/*
* Include machine specific inline routines