# \[PATCH 16/35\] fbdev: wm8505fb: Use safer strscpy() instead of strcpy()

- From: Ai Chao \<hidden\>
- Date: 2026-04-25 07:00:21 
- List: linux-fbdev
- Page: https://ratatoskr.run/linux-fbdev/2026/04/3528973
- Thread: https://ratatoskr.run/linux-fbdev/2026/04/3528984/t.md

```text
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 <redacted>
---
 drivers/video/fbdev/wm8505fb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/video/fbdev/wm8505fb.c b/drivers/video/fbdev/wm8505fb.c
index 5caf74ca92fb..8d6b530e5ad3 100644
--- a/drivers/video/fbdev/wm8505fb.c
+++ b/drivers/video/fbdev/wm8505fb.c
@@ -278,7 +278,7 @@ static int wm8505fb_probe(struct platform_device *pdev)
 	if (!fbi)
 		return -ENOMEM;
 
-	strcpy(fbi->fb.fix.id, DRIVER_NAME);
+	strscpy(fbi->fb.fix.id, DRIVER_NAME);
 
 	fbi->fb.fix.type	= FB_TYPE_PACKED_PIXELS;
 	fbi->fb.fix.xpanstep	= 1;
-- 
2.34.1

```
