diff options
Diffstat (limited to 'fs')
-rw-r--r-- | fs/debugfs/file.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/debugfs/file.c b/fs/debugfs/file.c index ff64bcd5b8f..63146295153 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; |