From: Mauro Carvalho Chehab Date: Mon, 10 Sep 2018 20:14:15 +0000 (-0400) Subject: media: rc: imon: replace strcpy() by strscpy() X-Git-Tag: for-4.21~64^2~238 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=2396e2821b0f42ab5048d015298d4858a0eefa32;p=uclinux-h8%2Flinux.git media: rc: imon: replace strcpy() by strscpy() The strcpy() function is being deprecated. Replace it by the safer strscpy(). Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Sean Young Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/rc/imon.c b/drivers/media/rc/imon.c index 1041c056854d..989d2554ec72 100644 --- a/drivers/media/rc/imon.c +++ b/drivers/media/rc/imon.c @@ -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);