This is a gentoo overlay hosting either customized ebuilds I have in use as well as ebuilds for my own projects.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

13 lines
494 B

diff --git a/src/common/blkdev.cc b/src/common/blkdev.cc
index d95a397a84..d2cbf4b7b9 100644
--- a/src/common/blkdev.cc
+++ b/src/common/blkdev.cc
@@ -225,7 +225,7 @@ int get_device_by_uuid(uuid_d dev_uuid, const char* label, char* partition,
rc = get_block_device_base(partition, basename,
sizeof(basename));
if (rc >= 0) {
- strncpy(device, basename, sizeof(basename));
+ strncpy(device, basename, sizeof(device));
rc = 0;
} else {
rc = -ENODEV;