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

index 66b49396ac15f56bd4d48d23915b3093a7615058..a7cf32cf40923a8b3a073af4d0d6139dacd03a60 100644 (file)
@@ -80,9 +80,6 @@ static int probe_ddf(blkid_probe pr,
        char version[DDF_REV_LENGTH + 1];
        uint64_t off = 0, lba;
 
-       if (pr->size < 0x30000)
-               return 1;
-
        for (i = 0; i < ARRAY_SIZE(hdrs); i++) {
                off = ((pr->size / 0x200) - hdrs[i]) * 0x200;
 
@@ -134,6 +131,7 @@ static int probe_ddf(blkid_probe pr,
 const struct blkid_idinfo ddfraid_idinfo = {
        .name           = "ddf_raid_member",
        .usage          = BLKID_USAGE_RAID,
+       .minsz          = 0x30000,
        .probefunc      = probe_ddf,
        .magics         = BLKID_NONE_MAGIC
 };