summaryrefslogtreecommitdiffstats
path: root/fs/debugfs/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/debugfs/file.c')
-rw-r--r--fs/debugfs/file.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/debugfs/file.c b/fs/debugfs/file.c
index ff64bcd..6314629 100644
--- a/fs/debugfs/file.c
+++ b/fs/debugfs/file.c
@@ -473,6 +473,7 @@ static ssize_t write_file_bool(struct file *file, const char __user *user_buf,
if (copy_from_user(buf, user_buf, buf_size))
return -EFAULT;
+ buf[buf_size] = '\0';
if (strtobool(buf, &bv) == 0)
*val = bv;
OpenPOWER on IntegriCloud