diff options
Diffstat (limited to 'drivers/md/dm-ioctl.c')
-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 d19854c98184..99de0e4ce831 100644 --- a/drivers/md/dm-ioctl.c +++ b/drivers/md/dm-ioctl.c | |||
@@ -645,9 +645,9 @@ static struct mapped_device *find_device(struct dm_ioctl *param) | |||
645 | * Sneakily write in both the name and the uuid | 645 | * Sneakily write in both the name and the uuid |
646 | * while we have the cell. | 646 | * while we have the cell. |
647 | */ | 647 | */ |
648 | strncpy(param->name, hc->name, sizeof(param->name)); | 648 | strlcpy(param->name, hc->name, sizeof(param->name)); |
649 | if (hc->uuid) | 649 | if (hc->uuid) |
650 | strncpy(param->uuid, hc->uuid, sizeof(param->uuid)-1); | 650 | strlcpy(param->uuid, hc->uuid, sizeof(param->uuid)); |
651 | else | 651 | else |
652 | param->uuid[0] = '\0'; | 652 | param->uuid[0] = '\0'; |
653 | 653 | ||