summaryrefslogtreecommitdiffstats
path: root/libblkid/src/superblocks
diff options
context:
space:
mode:
authorRostislav Skudnov2016-08-11 20:24:00 +0200
committerKarel Zak2016-08-16 12:08:46 +0200
commit9d89a95e889f69aebf78f6d5ae38920026a8a94f (patch)
tree2c642466abd0277f871271b8afa894f8c55a6ad7 /libblkid/src/superblocks
parentlsns: missing ns/<name> is not error (diff)
downloadkernel-qcow2-util-linux-9d89a95e889f69aebf78f6d5ae38920026a8a94f.tar.gz
kernel-qcow2-util-linux-9d89a95e889f69aebf78f6d5ae38920026a8a94f.tar.xz
kernel-qcow2-util-linux-9d89a95e889f69aebf78f6d5ae38920026a8a94f.zip
libblkid: Check that cluster size is nonzero when probing exFAT
This should prevent division by zero in find_label() Signed-off-by: Rostislav Skudnov <rostislav@tuxera.com>
Diffstat (limited to 'libblkid/src/superblocks')
-rw-r--r--libblkid/src/superblocks/exfat.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libblkid/src/superblocks/exfat.c b/libblkid/src/superblocks/exfat.c
index 3f1e75c13..01ed30b78 100644
--- a/libblkid/src/superblocks/exfat.c
+++ b/libblkid/src/superblocks/exfat.c
@@ -114,7 +114,7 @@ static int probe_exfat(blkid_probe pr, const struct blkid_idmag *mag)
struct exfat_entry_label *label;
sb = blkid_probe_get_sb(pr, mag, struct exfat_super_block);
- if (!sb)
+ if (!sb || !CLUSTER_SIZE(sb))
return errno ? -errno : BLKID_PROBE_NONE;
label = find_label(pr, sb);