Commit 22a8b849 authored by Heinz Mauelshagen's avatar Heinz Mauelshagen Committed by Mike Snitzer

dm ioctl: prefer strscpy() instead of strlcpy()

Signed-off-by: default avatarHeinz Mauelshagen <heinzm@redhat.com>
Signed-off-by: default avatarMike Snitzer <snitzer@kernel.org>
parent b39b7324
...@@ -937,9 +937,9 @@ static struct hash_cell *__find_device_hash_cell(struct dm_ioctl *param) ...@@ -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 * Sneakily write in both the name and the uuid
* while we have the cell. * while we have the cell.
*/ */
strlcpy(param->name, hc->name, sizeof(param->name)); strscpy(param->name, hc->name, sizeof(param->name));
if (hc->uuid) if (hc->uuid)
strlcpy(param->uuid, hc->uuid, sizeof(param->uuid)); strscpy(param->uuid, hc->uuid, sizeof(param->uuid));
else else
param->uuid[0] = '\0'; param->uuid[0] = '\0';
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment