summaryrefslogtreecommitdiffstats
path: root/libblkid
diff options
context:
space:
mode:
authorKarel Zak2017-03-24 11:46:33 +0100
committerKarel Zak2017-03-24 11:46:33 +0100
commit044d6e556564f76b4ac3543cadb44b0cd48aa22d (patch)
treeda091e5132b6bccdca24d803c642100ceea0eed4 /libblkid
parentbuild-sys: add missing header file (diff)
downloadkernel-qcow2-util-linux-044d6e556564f76b4ac3543cadb44b0cd48aa22d.tar.gz
kernel-qcow2-util-linux-044d6e556564f76b4ac3543cadb44b0cd48aa22d.tar.xz
kernel-qcow2-util-linux-044d6e556564f76b4ac3543cadb44b0cd48aa22d.zip
libblkid: fix typo
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'libblkid')
-rw-r--r--libblkid/src/superblocks/hfs.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libblkid/src/superblocks/hfs.c b/libblkid/src/superblocks/hfs.c
index ef746d4e2..c2344114a 100644
--- a/libblkid/src/superblocks/hfs.c
+++ b/libblkid/src/superblocks/hfs.c
@@ -244,6 +244,7 @@ static int probe_hfsplus(blkid_probe pr, const struct blkid_idmag *mag)
leaf_node_head = be32_to_cpu(bnode->leaf_head);
leaf_node_size = be16_to_cpu(bnode->node_size);
leaf_node_count = be32_to_cpu(bnode->leaf_count);
+
if (leaf_node_size < sizeof(struct hfsplus_bnode_descriptor) +
sizeof(struct hfsplus_catalog_key) || leaf_node_count == 0)
return 0;
@@ -286,7 +287,7 @@ static int probe_hfsplus(blkid_probe pr, const struct blkid_idmag *mag)
&buf[sizeof(struct hfsplus_bnode_descriptor)];
if (be32_to_cpu(key->parent_id) != HFSPLUS_POR_CNID ||
- be16_to_cpu(key->unicode_len > 255))
+ be16_to_cpu(key->unicode_len) > 255)
return 0;
blkid_probe_set_utf8label(pr, key->unicode,