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

index 24879302c78062d1948d56b0ba4bbd4b34c42a3c..c8b1297745c498d4689dc2833403abfa07b152e3 100644 (file)
@@ -29,8 +29,6 @@ static int probe_highpoint45x(blkid_probe pr,
        uint64_t off;
        uint32_t magic;
 
-       if (pr->size < 0x10000)
-               return 1;
        if (!S_ISREG(pr->mode) && !blkid_probe_is_wholedisk(pr))
                return 1;
 
@@ -62,6 +60,7 @@ static int probe_highpoint37x(blkid_probe pr,
 const struct blkid_idinfo highpoint45x_idinfo = {
        .name           = "hpt45x_raid_member",
        .usage          = BLKID_USAGE_RAID,
+       .minsz          = 0x10000,
        .probefunc      = probe_highpoint45x,
        .magics         = BLKID_NONE_MAGIC
 };