From c0decac19da3906d9b66291e57b7759489e1170f Mon Sep 17 00:00:00 2001 From: Mauro Carvalho Chehab Date: Mon, 10 Sep 2018 08:19:14 -0400 Subject: media: use strscpy() instead of strlcpy() The implementation of strscpy() is more robust and safer. That's now the recommended way to copy NUL terminated strings. Signed-off-by: Mauro Carvalho Chehab Reviewed-by: Kees Cook Acked-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- drivers/media/rc/ati_remote.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'drivers/media/rc/ati_remote.c') diff --git a/drivers/media/rc/ati_remote.c b/drivers/media/rc/ati_remote.c index 8e82610ffaad..265e91a2a70d 100644 --- a/drivers/media/rc/ati_remote.c +++ b/drivers/media/rc/ati_remote.c @@ -862,7 +862,7 @@ static int ati_remote_probe(struct usb_interface *interface, ati_remote->interface = interface; usb_make_path(udev, ati_remote->rc_phys, sizeof(ati_remote->rc_phys)); - strlcpy(ati_remote->mouse_phys, ati_remote->rc_phys, + strscpy(ati_remote->mouse_phys, ati_remote->rc_phys, sizeof(ati_remote->mouse_phys)); strlcat(ati_remote->rc_phys, "/input0", sizeof(ati_remote->rc_phys)); -- cgit v1.2.3