From: Karel Zak Date: Tue, 7 Oct 2014 09:33:46 +0000 (+0200) Subject: libfdisk: fix add_logical() assert X-Git-Tag: v2.26-rc1~415 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=60ba8c362d93815f4b1cdc3ad9cebda3e11677f7;p=thirdparty%2Futil-linux.git 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 --- diff --git a/libfdisk/src/dos.c b/libfdisk/src/dos.c index 15ea6642f2..3cc156eee4 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);