From 0c8f817a7485d420698eeb115e8f4e757ab34029 Mon Sep 17 00:00:00 2001 From: ae Date: Thu, 29 Mar 2012 07:29:27 +0000 Subject: [PATCH] VMDB offset should be greater than logical volume size only for MBR. --- sys/geom/part/g_part_ldm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/geom/part/g_part_ldm.c b/sys/geom/part/g_part_ldm.c index dfd1a91c3ec4..6defef633b0f 100644 --- a/sys/geom/part/g_part_ldm.c +++ b/sys/geom/part/g_part_ldm.c @@ -495,7 +495,7 @@ ldm_privhdr_check(struct ldm_db *db, struct g_consumer *cp, int is_gpt) g_free(buf); if (hdr.start > last || hdr.start + hdr.size - 1 > last || - (hdr.start + hdr.size - 1 > hdr.db_offset && is_gpt) || + (hdr.start + hdr.size - 1 > hdr.db_offset && !is_gpt) || hdr.db_size != LDM_DB_SIZE || hdr.db_offset + LDM_DB_SIZE - 1 > last || hdr.th_offset[0] >= LDM_DB_SIZE ||