diff --git a/lib/format1/disk-rep.c b/lib/format1/disk-rep.c index 09bbc4dc7..78b333756 100644 --- a/lib/format1/disk-rep.c +++ b/lib/format1/disk-rep.c @@ -172,7 +172,7 @@ static int _read_uuids(struct disk_list *data) fail; memcpy(ul->uuid, buffer, NAME_LEN); - ul->uuid[NAME_LEN] = '\0'; + ul->uuid[NAME_LEN - 1] = '\0'; list_add(&data->uuids, &ul->list);