[PATCH 18/35] fbdev: sh7760fb: Use safer strscpy() instead of strcpy()

From: Ai Chao

Date: Sat Apr 25 2026 - 03:03:11 EST


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 <aichao@xxxxxxxxxx>
---
drivers/video/fbdev/sh7760fb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/video/fbdev/sh7760fb.c b/drivers/video/fbdev/sh7760fb.c
index 130adef2e468..acd70dff3a65 100644
--- a/drivers/video/fbdev/sh7760fb.c
+++ b/drivers/video/fbdev/sh7760fb.c
@@ -508,7 +508,7 @@ static int sh7760fb_probe(struct platform_device *pdev)
info->var.transp.length = 0;
info->var.transp.msb_right = 0;

- strcpy(info->fix.id, "sh7760-lcdc");
+ strscpy(info->fix.id, "sh7760-lcdc");

/* set the DON2 bit now, before cmap allocation, as it will randomize
* palette memory.
--
2.34.1