mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-18 22:14:16 +00:00
dm ioctl: prefer strscpy() instead of strlcpy()
Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com> Signed-off-by: Mike Snitzer <snitzer@kernel.org>
This commit is contained in:
parent
b39b73243d
commit
22a8b84945
1 changed files with 2 additions and 2 deletions
|
@ -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';
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue