mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] staging: vme_user: use scnprintf in tsi148_alloc_resource
@ 2026-10-21  3:13 LiuJunyuan
  2026-10-21  6:01 ` Dan Carpenter
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: LiuJunyuan @ 2026-10-21  3:13 UTC (permalink / raw)
  To: gregkh; +Cc: linux-staging, linux-kernel, LiuJunyuan

Replace sprintf() with scnprintf() when formatting the resource name.

Signed-off-by: LiuJunyuan <2058432396@qq.com>
---
 drivers/staging/vme_user/vme_tsi148.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/vme_user/vme_tsi148.c b/drivers/staging/vme_user/vme_tsi148.c
index 9447c00bc013..a0a7c8341995 100644
--- a/drivers/staging/vme_user/vme_tsi148.c
+++ b/drivers/staging/vme_user/vme_tsi148.c
@@ -745,8 +745,8 @@ static int tsi148_alloc_resource(struct vme_master_resource *image,
 		}
 	}
 
-	sprintf((char *)image->bus_resource.name, "%s.%d", tsi148_bridge->name,
-		image->number);
+	scnprintf(image->bus_resource.name, VMENAMSIZ + 3, "%s.%d",
+		  tsi148_bridge->name, image->number);
 
 	image->bus_resource.start = 0;
 	image->bus_resource.end = (unsigned long)size;
-- 
2.43.0



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-10-23 15:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-21  3:13 [PATCH] staging: vme_user: use scnprintf in tsi148_alloc_resource LiuJunyuan
2026-10-21  6:01 ` Dan Carpenter
2026-10-21  6:15 ` Greg KH
2026-10-21  9:01 ` David Laight
2026-10-23 13:36 ` Greg KH

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®