[PATCH 13/35] fbdev: vt8500lcdfb: Use safer strscpy() instead of strcpy()
Ai Chao
aichao at kylinos.cn
Fri Apr 24 23:59:04 PDT 2026
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 at kylinos.cn>
---
drivers/video/fbdev/vt8500lcdfb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/fbdev/vt8500lcdfb.c b/drivers/video/fbdev/vt8500lcdfb.c
index 85c7a99a7d64..d6e061628100 100644
--- a/drivers/video/fbdev/vt8500lcdfb.c
+++ b/drivers/video/fbdev/vt8500lcdfb.c
@@ -287,7 +287,7 @@ static int vt8500lcd_probe(struct platform_device *pdev)
if (!fbi)
return -ENOMEM;
- strcpy(fbi->fb.fix.id, "VT8500 LCD");
+ strscpy(fbi->fb.fix.id, "VT8500 LCD");
fbi->fb.fix.type = FB_TYPE_PACKED_PIXELS;
fbi->fb.fix.xpanstep = 0;
--
2.34.1
More information about the linux-arm-kernel
mailing list