|
@@ -645,9 +645,9 @@ static struct mapped_device *find_device(struct dm_ioctl *param)
|
|
|
* Sneakily write in both the name and the uuid
|
|
|
* while we have the cell.
|
|
|
*/
|
|
|
- strncpy(param->name, hc->name, sizeof(param->name));
|
|
|
+ strlcpy(param->name, hc->name, sizeof(param->name));
|
|
|
if (hc->uuid)
|
|
|
- strncpy(param->uuid, hc->uuid, sizeof(param->uuid)-1);
|
|
|
+ strlcpy(param->uuid, hc->uuid, sizeof(param->uuid));
|
|
|
else
|
|
|
param->uuid[0] = '\0';
|
|
|
|