[PATCH 09/35] fbdev: controlfb: Use safer strscpy() instead of strcpy()

Ai Chao <[email protected]>
Newsgroups org.kernel.vger.linux-parisc,org.freedesktop.lists.dri-devel,org.infradead.lists.linux-arm-kernel,org.kernel.vger.linux-fbdev,org.kernel.vger.linux-kernel
Message-ID <[email protected]>
Use a safer function strscpy() instead of strcpy() for copying to arrays.

Only idiomatic code replacement, and no functional changes.

Signed-off-by: Ai Chao <[email protected]>
---
 drivers/video/fbdev/controlfb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/video/fbdev/controlfb.c b/drivers/video/fbdev/controlfb.c
index 4bb821d7f284..09cf6befd8d3 100644
--- a/drivers/video/fbdev/controlfb.c
+++ b/drivers/video/fbdev/controlfb.c
@@ -780,7 +780,7 @@ static void __init control_init_info(struct fb_info *info, struct fb_info_contro
 	fb_alloc_cmap(&info->cmap, 256, 0);
 
 	/* Fill fix common fields */
-	strcpy(info->fix.id, "control");
+	strscpy(info->fix.id, "control");
 	info->fix.mmio_start = p->control_regs_phys;
 	info->fix.mmio_len = sizeof(struct control_regs);
 	info->fix.type = FB_TYPE_PACKED_PIXELS;
-- 
2.34.1
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.