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

index 5fc5fc4bcfc9ee5e38f24ea9b62a616720184f1d..813d30ee20a747412ae5903a8f601e3740fe1ed6 100644 (file)
@@ -79,9 +79,6 @@ static int probe_adraid(blkid_probe pr,
        uint64_t off;
        struct adaptec_metadata *ad;
 
-       if (pr->size < 0x10000)
-               return BLKID_PROBE_NONE;
-
        if (!S_ISREG(pr->mode) && !blkid_probe_is_wholedisk(pr))
                return BLKID_PROBE_NONE;
 
@@ -109,6 +106,7 @@ static int probe_adraid(blkid_probe pr,
 const struct blkid_idinfo adraid_idinfo = {
        .name           = "adaptec_raid_member",
        .usage          = BLKID_USAGE_RAID,
+       .minsz          = 0x10000,
        .probefunc      = probe_adraid,
        .magics         = BLKID_NONE_MAGIC
 };