> On Aug 30, 2016, at 1:45 PM, Karel Zak <kzak@xxxxxxxxxx> wrote: > > On Tue, Aug 30, 2016 at 10:07:49AM +0000, Rostislav Skudnov wrote: >> Do not hang if there is a cluster chain loop in rootdir >> --- >> libblkid/src/superblocks/exfat.c | 4 +++- >> 1 file changed, 3 insertions(+), 1 deletion(-) >> >> diff --git a/libblkid/src/superblocks/exfat.c b/libblkid/src/superblocks/exfat.c >> index 01ed30b..e058423 100644 >> --- a/libblkid/src/superblocks/exfat.c >> +++ b/libblkid/src/superblocks/exfat.c >> @@ -86,8 +86,10 @@ static struct exfat_entry_label *find_label(blkid_probe pr, >> uint32_t cluster = le32_to_cpu(sb->rootdir_cluster); >> uint64_t offset = cluster_to_offset(sb, cluster); >> uint8_t *entry; >> + const size_t max_iter = 10000; > > for FAT we have 100 as the limit, would be this smaller number > better? > > Karel > > -- > Karel Zak <kzak@xxxxxxxxxx> > http://karelzak.blogspot.com As far as I understand, in vfat we walk over 100 clusters, each of which may have many direntries. Here 10000 is the max number of direntries we visit.-- To unsubscribe from this list: send the line "unsubscribe util-linux" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html