[PATCH 12/35] fbdev: arkfb: Use safer strscpy() instead of strcpy()
From: Ai Chao
Date: Sat Apr 25 2026 - 03:05:32 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/arkfb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/fbdev/arkfb.c b/drivers/video/fbdev/arkfb.c
index 866c1165704e..a05900f0e691 100644
--- a/drivers/video/fbdev/arkfb.c
+++ b/drivers/video/fbdev/arkfb.c
@@ -1025,7 +1025,7 @@ static int ark_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
info->screen_size = (1 << (regval >> 6)) << 20;
info->fix.smem_len = info->screen_size;
- strcpy(info->fix.id, "ARK 2000PV");
+ strscpy(info->fix.id, "ARK 2000PV");
info->fix.mmio_start = 0;
info->fix.mmio_len = 0;
info->fix.type = FB_TYPE_PACKED_PIXELS;
--
2.34.1