]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libblkid: (isw_raid) validate size in standard minsz predicate
authorThomas Weißschuh <thomas@t-8ch.de>
Sat, 30 Sep 2023 22:07:22 +0000 (00:07 +0200)
committerThomas Weißschuh <thomas@t-8ch.de>
Sat, 30 Sep 2023 22:18:24 +0000 (00:18 +0200)
Signed-off-by: Thomas Weißschuh <thomas@t-8ch.de>
libblkid/src/superblocks/isw_raid.c

index 81d53a1d0b846bfe3efb8076e5ed155b921dd2f1..aa03bcd44bba077158428f8869c3b79612d7bdd3 100644 (file)
@@ -32,8 +32,6 @@ static int probe_iswraid(blkid_probe pr,
        unsigned int sector_size;
        struct isw_metadata *isw;
 
-       if (pr->size < 0x10000)
-               return 1;
        if (!S_ISREG(pr->mode) && !blkid_probe_is_wholedisk(pr))
                return 1;
 
@@ -60,6 +58,7 @@ static int probe_iswraid(blkid_probe pr,
 const struct blkid_idinfo iswraid_idinfo = {
        .name           = "isw_raid_member",
        .usage          = BLKID_USAGE_RAID,
+       .minsz          = 0x10000,
        .probefunc      = probe_iswraid,
        .magics         = BLKID_NONE_MAGIC
 };