summaryrefslogtreecommitdiffstats
path: root/drivers/media/radio/wl128x/fmdrv_v4l2.c
diff options
context:
space:
mode:
authorDan Carpenter <dan.carpenter@oracle.com>2011-11-23 02:45:40 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-11-25 15:46:59 -0200
commit75c1ca364d0d5d70ad12c5dac40bbe6598624cab (patch)
tree3cd6068c8a0344e327f3e40d64e43dc9853f0f56 /drivers/media/radio/wl128x/fmdrv_v4l2.c
parentb698c784bfacc909b05e043d8fca08281fe154bb (diff)
downloadblackbird-op-linux-75c1ca364d0d5d70ad12c5dac40bbe6598624cab.tar.gz
blackbird-op-linux-75c1ca364d0d5d70ad12c5dac40bbe6598624cab.zip
[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>
Diffstat (limited to 'drivers/media/radio/wl128x/fmdrv_v4l2.c')
-rw-r--r--drivers/media/radio/wl128x/fmdrv_v4l2.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/radio/wl128x/fmdrv_v4l2.c b/drivers/media/radio/wl128x/fmdrv_v4l2.c
index 4f5c43d2566c..077d369a0173 100644
--- a/drivers/media/radio/wl128x/fmdrv_v4l2.c
+++ b/drivers/media/radio/wl128x/fmdrv_v4l2.c
@@ -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)
OpenPOWER on IntegriCloud