diff options
author | Heinz Mauelshagen <heinzm@redhat.com> | 2023-02-07 23:04:01 +0100 |
---|---|---|
committer | Mike Snitzer <snitzer@kernel.org> | 2023-02-14 14:23:07 -0500 |
commit | 22a8b84945e9a5027174e06ec5c8ce3d978844d6 (patch) | |
tree | 0b7624cfb348d7562506ef8eef7d465f85b251a7 | |
parent | b39b73243dd40b8b55a80cce7520745c9559a08d (diff) | |
download | linux-stable-22a8b84945e9a5027174e06ec5c8ce3d978844d6.tar.gz linux-stable-22a8b84945e9a5027174e06ec5c8ce3d978844d6.tar.bz2 linux-stable-22a8b84945e9a5027174e06ec5c8ce3d978844d6.zip |
dm ioctl: prefer strscpy() instead of strlcpy()
Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@kernel.org>
-rw-r--r-- | drivers/md/dm-ioctl.c | 4 |
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'; |