diff options
author | Ansuel Smith <ansuelsmth@gmail.com> | 2019-06-16 19:00:47 +0200 |
---|---|---|
committer | John Crispin <john@phrozen.org> | 2019-07-01 15:53:02 +0200 |
commit | d563f3ca2040afc85780dc2e28eece59689b47d5 (patch) | |
tree | 716aed4161055a68d3fff17d4b8857d0b8fe48f5 | |
parent | 3957dd39c6c2413c4341258d63a913948f99ac6f (diff) | |
download | fstools-d563f3ca2040afc85780dc2e28eece59689b47d5.tar.gz |
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 <ansuelsmth@gmail.com>
-rw-r--r-- | libblkid-tiny/btrfs.c | 2 |
1 files changed, 1 insertions, 1 deletions
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"); |