From 60ba8c362d93815f4b1cdc3ad9cebda3e11677f7 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Tue, 7 Oct 2014 11:33:46 +0200 Subject: [PATCH] libfdisk: fix add_logical() assert The zero index is absolutely valid for extended partition (it means extended partition could be the first partition on the device). Reported-by: Christoph Hoopmann Signed-off-by: Karel Zak --- libfdisk/src/dos.c | 1 - 1 file changed, 1 deletion(-) diff --git a/libfdisk/src/dos.c b/libfdisk/src/dos.c index 15ea6642f..3cc156eee 100644 --- a/libfdisk/src/dos.c +++ b/libfdisk/src/dos.c @@ -1158,7 +1158,6 @@ static int add_logical(struct fdisk_context *cxt, struct fdisk_partition *pa) assert(cxt); assert(cxt->label); assert(self_label(cxt)->ext_offset); - assert(self_label(cxt)->ext_index); DBG(LABEL, ul_debug("DOS: nparts max: %zu", cxt->label->nparts_max)); pe = self_pte(cxt, cxt->label->nparts_max);