From: Rostislav Skudnov Date: Thu, 11 Aug 2016 18:24:00 +0000 (+0000) Subject: libblkid: Check that cluster size is nonzero when probing exFAT X-Git-Tag: v2.29-rc1~117 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=9d89a95e889f69aebf78f6d5ae38920026a8a94f;p=thirdparty%2Futil-linux.git libblkid: Check that cluster size is nonzero when probing exFAT This should prevent division by zero in find_label() Signed-off-by: Rostislav Skudnov --- diff --git a/libblkid/src/superblocks/exfat.c b/libblkid/src/superblocks/exfat.c index 3f1e75c138..01ed30b788 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);