Message ID | 1515744209-136099-1-git-send-email-wangxiongfeng2@huawei.com |
---|---|
State | New |
Headers | show |
Series | drm/nouveau/core/client: use strlcpy() instead of strncpy() | expand |
diff --git a/drivers/gpu/drm/nouveau/nvif/client.c b/drivers/gpu/drm/nouveau/nvif/client.c index 12db549..f294d99 100644 --- a/drivers/gpu/drm/nouveau/nvif/client.c +++ b/drivers/gpu/drm/nouveau/nvif/client.c @@ -69,7 +69,7 @@ } nop = {}; int ret; - strncpy(args.name, name, sizeof(args.name)); + strlcpy(args.name, name, sizeof(args.name)); ret = nvif_object_init(parent != client ? &parent->object : NULL, 0, NVIF_CLASS_CLIENT, &args, sizeof(args), &client->object);