media: rc: imon: replace strcpy() by strscpy()
authorMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Mon, 10 Sep 2018 20:14:15 +0000 (16:14 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Thu, 22 Nov 2018 18:32:47 +0000 (13:32 -0500)
The strcpy() function is being deprecated. Replace it by the
safer strscpy().

Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Signed-off-by: Sean Young <sean@mess.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/media/rc/imon.c

index 1041c056854d5035d2d6c6072ad37537334c2927..989d2554ec728beab95a204f532a028c812f4975 100644 (file)
@@ -772,9 +772,9 @@ static ssize_t show_associate_remote(struct device *d,
 
        mutex_lock(&ictx->lock);
        if (ictx->rf_isassociating)
-               strcpy(buf, "associating\n");
+               strscpy(buf, "associating\n", PAGE_SIZE);
        else
-               strcpy(buf, "closed\n");
+               strscpy(buf, "closed\n", PAGE_SIZE);
 
        dev_info(d, "Visit http://www.lirc.org/html/imon-24g.html for instructions on how to associate your iMON 2.4G DT/LT remote\n");
        mutex_unlock(&ictx->lock);