mirror of
https://github.com/AuxXxilium/linux_dsm_epyc7002.git
synced 2024-11-27 03:10:50 +07:00
[media] radio: NUL terminate a user string
We pass this to fm_tx_set_radio_text() which expects a NUL terminated string. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
This commit is contained in:
parent
b698c784bf
commit
75c1ca364d
@ -84,6 +84,7 @@ static ssize_t fm_v4l2_fops_write(struct file *file, const char __user * buf,
|
||||
struct fmdev *fmdev;
|
||||
|
||||
ret = copy_from_user(&rds, buf, sizeof(rds));
|
||||
rds.text[sizeof(rds.text) - 1] = '\0';
|
||||
fmdbg("(%d)type: %d, text %s, af %d\n",
|
||||
ret, rds.text_type, rds.text, rds.af_freq);
|
||||
if (ret)
|
||||
|
Loading…
Reference in New Issue
Block a user