From d11af64ede9407fe7f951c9e54b9e288ef492ae2 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Thomas=20Wei=C3=9Fschuh?= Date: Sun, 1 Oct 2023 00:07:02 +0200 Subject: [PATCH] libblkid: (ddf_raid) validate size in standard minsz predicate MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Thomas Weißschuh --- libblkid/src/superblocks/ddf_raid.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/libblkid/src/superblocks/ddf_raid.c b/libblkid/src/superblocks/ddf_raid.c index 66b49396ac..a7cf32cf40 100644 --- a/libblkid/src/superblocks/ddf_raid.c +++ b/libblkid/src/superblocks/ddf_raid.c @@ -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 }; -- 2.47.3