]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libblkid: (lsi_raid) validate size in standard minsz predicate
authorThomas Weißschuh <thomas@t-8ch.de>
Sat, 30 Sep 2023 22:08:06 +0000 (00:08 +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/lsi_raid.c

index 697b0fe89bdb8e36497788ebe7c860b69b002997..2ceed9b2f0539954fc0984e62f458c40fe8ba6c5 100644 (file)
@@ -29,8 +29,6 @@ static int probe_lsiraid(blkid_probe pr,
        uint64_t off;
        struct lsi_metadata *lsi;
 
-       if (pr->size < 0x10000)
-               return 1;
        if (!S_ISREG(pr->mode) && !blkid_probe_is_wholedisk(pr))
                return 1;
 
@@ -53,6 +51,7 @@ static int probe_lsiraid(blkid_probe pr,
 const struct blkid_idinfo lsiraid_idinfo = {
        .name           = "lsi_mega_raid_member",
        .usage          = BLKID_USAGE_RAID,
+       .minsz          = 0x10000,
        .probefunc      = probe_lsiraid,
        .magics         = BLKID_NONE_MAGIC
 };