From 3f19aab602f3a0802292325165fef3f891e1f19e Mon Sep 17 00:00:00 2001 From: Iori Mizutani Date: Thu, 24 Oct 2024 08:15:27 +0900 Subject: [PATCH] fix: replace strlcpy with preferred strscpy --- driver/ptx_chrdev.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/driver/ptx_chrdev.c b/driver/ptx_chrdev.c index dec1cee..4937d77 100644 --- a/driver/ptx_chrdev.c +++ b/driver/ptx_chrdev.c @@ -566,7 +566,7 @@ int ptx_chrdev_context_create(const char *name, const char *devname, return -ENOMEM; mutex_init(&ctx->lock); - strlcpy(ctx->devname, devname, sizeof(ctx->devname)); + strscpy(ctx->devname, devname, sizeof(ctx->devname)); INIT_LIST_HEAD(&ctx->group_list);