summaryrefslogtreecommitdiffstats
path: root/src/btrfs.c
diff options
context:
space:
mode:
authorChristophe Grenier <grenier@cgsecurity.org>2013-05-14 09:11:07 +0200
committerChristophe Grenier <grenier@cgsecurity.org>2013-05-14 09:11:07 +0200
commitdfb2b013aa42ee4661212ade7e76e85a03cab45c (patch)
treec703c7f65a65e6abab4aa72b67b74d000b760a56 /src/btrfs.c
parenta643146280fffb97ff681d17a9b35fc15e6b67f8 (diff)
Additional length check in set_part_name() and set_part_name_chomp()
Diffstat (limited to 'src/btrfs.c')
-rw-r--r--src/btrfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/btrfs.c b/src/btrfs.c
index 9585b24..79b6117 100644
--- a/src/btrfs.c
+++ b/src/btrfs.c
@@ -42,7 +42,7 @@ static int test_btrfs(const struct btrfs_super_block *sb, partition_t *partition
static int set_btrfs_info(const struct btrfs_super_block *sb, partition_t *partition)
{
partition->blocksize=le32(sb->dev_item.sector_size);
- set_part_name(partition, sb->label, sizeof(partition->partname));
+ set_part_name(partition, sb->label, sizeof(sb->label));
snprintf(partition->info, sizeof(partition->info), "btrfs blocksize=%u", partition->blocksize);
if(le64(sb->bytenr)!=partition->part_offset + BTRFS_SUPER_INFO_OFFSET)
{