projects
/
project
/
fstools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3957dd3
)
libblkid-tiny: fix wrong btrfs label length
author
Ansuel Smith
<ansuelsmth@gmail.com>
Sun, 16 Jun 2019 17:00:47 +0000
(19:00 +0200)
committer
John Crispin
<john@phrozen.org>
Mon, 1 Jul 2019 13:53:02 +0000
(15:53 +0200)
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>
libblkid-tiny/btrfs.c
patch
|
blob
|
history
diff --git
a/libblkid-tiny/btrfs.c
b/libblkid-tiny/btrfs.c
index 7ce3dfff86d643ca52a3fb917a09a4b30606ba2f..cf33db51009e07dcb20a53d6dbe31ffd6b9fe18e 100644
(file)
--- 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");