OSDN Git Service

Allow clusters bitmap size to exceed minimum value.
authorrelan <relan@users.noreply.github.com>
Tue, 1 Jun 2010 17:11:16 +0000 (17:11 +0000)
committerrelan <relan@users.noreply.github.com>
Mon, 24 Aug 2015 05:26:12 +0000 (08:26 +0300)
libexfat/node.c

index c50b47c..a10bd70 100644 (file)
@@ -309,9 +309,10 @@ static int readdir(struct exfat* ef, const struct exfat_node* parent,
                        }
                        ef->cmap.size = le32_to_cpu(ef->sb->cluster_count) -
                                EXFAT_FIRST_DATA_CLUSTER;
-                       if (le64_to_cpu(bitmap->size) != (ef->cmap.size + 7) / 8)
+                       if (le64_to_cpu(bitmap->size) < (ef->cmap.size + 7) / 8)
                        {
-                               exfat_error("invalid bitmap size: %"PRIu64" (expected %u)",
+                               exfat_error("invalid bitmap size: %"PRIu64
+                                               " (expected at least %u)",
                                                le64_to_cpu(bitmap->size), (ef->cmap.size + 7) / 8);
                                return -EIO;
                        }