summaryrefslogtreecommitdiff
path: root/drivers/md
diff options
context:
space:
mode:
authorHeinz Mauelshagen <heinzm@redhat.com>2023-02-07 23:04:01 +0100
committerMike Snitzer <snitzer@kernel.org>2023-02-14 14:23:07 -0500
commit22a8b84945e9a5027174e06ec5c8ce3d978844d6 (patch)
tree0b7624cfb348d7562506ef8eef7d465f85b251a7 /drivers/md
parentb39b73243dd40b8b55a80cce7520745c9559a08d (diff)
dm ioctl: prefer strscpy() instead of strlcpy()
Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com> Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/dm-ioctl.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/md/dm-ioctl.c b/drivers/md/dm-ioctl.c
index 9a19bcd8fcfe..f34d36a4b4a1 100644
--- a/drivers/md/dm-ioctl.c
+++ b/drivers/md/dm-ioctl.c
@@ -937,9 +937,9 @@ static struct hash_cell *__find_device_hash_cell(struct dm_ioctl *param)
* Sneakily write in both the name and the uuid
* while we have the cell.
*/
- strlcpy(param->name, hc->name, sizeof(param->name));
+ strscpy(param->name, hc->name, sizeof(param->name));
if (hc->uuid)
- strlcpy(param->uuid, hc->uuid, sizeof(param->uuid));
+ strscpy(param->uuid, hc->uuid, sizeof(param->uuid));
else
param->uuid[0] = '\0';