]> git.ipfire.org Git - thirdparty/util-linux.git/commitdiff
libfdisk: fix add_logical() assert
authorKarel Zak <kzak@redhat.com>
Tue, 7 Oct 2014 09:33:46 +0000 (11:33 +0200)
committerKarel Zak <kzak@redhat.com>
Tue, 7 Oct 2014 09:33:46 +0000 (11:33 +0200)
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 <christophhoopmann@gmail.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
libfdisk/src/dos.c

index 15ea6642f281cb914e8eeb22f1da2b68f740963d..3cc156eee424bef8681e1beb768d8017c2d005db 100644 (file)
@@ -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);