|
@@ -179,6 +179,9 @@ static ssize_t write_file_tx99(struct file *file, const char __user *user_buf,
|
|
ssize_t len;
|
|
ssize_t len;
|
|
int r;
|
|
int r;
|
|
|
|
|
|
|
|
+ if (count < 1)
|
|
|
|
+ return -EINVAL;
|
|
|
|
+
|
|
if (sc->cur_chan->nvifs > 1)
|
|
if (sc->cur_chan->nvifs > 1)
|
|
return -EOPNOTSUPP;
|
|
return -EOPNOTSUPP;
|
|
|
|
|
|
@@ -186,6 +189,8 @@ static ssize_t write_file_tx99(struct file *file, const char __user *user_buf,
|
|
if (copy_from_user(buf, user_buf, len))
|
|
if (copy_from_user(buf, user_buf, len))
|
|
return -EFAULT;
|
|
return -EFAULT;
|
|
|
|
|
|
|
|
+ buf[len] = '\0';
|
|
|
|
+
|
|
if (strtobool(buf, &start))
|
|
if (strtobool(buf, &start))
|
|
return -EINVAL;
|
|
return -EINVAL;
|
|
|
|
|