Skip to content

Commit 22a8b84

Browse files
mauelshaMike Snitzer
authored andcommitted
dm ioctl: prefer strscpy() instead of strlcpy()
Signed-off-by: Heinz Mauelshagen <[email protected]> Signed-off-by: Mike Snitzer <[email protected]>
1 parent b39b732 commit 22a8b84

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/md/dm-ioctl.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -937,9 +937,9 @@ static struct hash_cell *__find_device_hash_cell(struct dm_ioctl *param)
937937
* Sneakily write in both the name and the uuid
938938
* while we have the cell.
939939
*/
940-
strlcpy(param->name, hc->name, sizeof(param->name));
940+
strscpy(param->name, hc->name, sizeof(param->name));
941941
if (hc->uuid)
942-
strlcpy(param->uuid, hc->uuid, sizeof(param->uuid));
942+
strscpy(param->uuid, hc->uuid, sizeof(param->uuid));
943943
else
944944
param->uuid[0] = '\0';
945945

0 commit comments

Comments
 (0)