From: Ansuel Smith Date: Sun, 16 Jun 2019 17:00:47 +0000 (+0200) Subject: libblkid-tiny: fix wrong btrfs label length X-Git-Url: http://git.openwrt.org/?a=commitdiff_plain;h=d563f3ca2040afc85780dc2e28eece59689b47d5;p=project%2Ffstools.git libblkid-tiny: fix wrong btrfs label length Btrfs label length is 256 included the termination char ( '\0' ) as the real max length is 255 (less than 256 from the wiki). Signed-off-by: Ansuel Smith --- diff --git a/libblkid-tiny/btrfs.c b/libblkid-tiny/btrfs.c index 7ce3dff..cf33db5 100644 --- a/libblkid-tiny/btrfs.c +++ b/libblkid-tiny/btrfs.c @@ -70,7 +70,7 @@ static int probe_btrfs(blkid_probe pr, const struct blkid_idmag *mag) if (*bfs->label) blkid_probe_set_label(pr, (unsigned char *) bfs->label, - sizeof(bfs->label)); + sizeof(bfs->label) - 1); blkid_probe_set_uuid(pr, bfs->fsid); blkid_probe_set_uuid_as(pr, bfs->dev_item.uuid, "UUID_SUB");