Bug: libfdisk/dos.c: Extended partition number == 1? -> crash
To whom it may concern,
seems like I discovered a crash in util-linux-2.25.1:
If you've created an extended partition using number 1, fdisk/cfdisk/whateveruseslibfdisk will crash when adding a new logical partition.
Steps to reproduce:
fdisk /dev/sda
o, n, e, 1, .., n, l ->
fdisk: libfdisk/src/dos.c:1161: add_logical: Assertion 'self_label(cxt)->ext_index' failed
This does happen since 2.25, seems to come from [1]. Versions prior to 2.25 (2.24 tested) aren't effected and so are able to write a partition layout without primary partitions.
During testing of this bug, I noticed a second crash when writing the partition table to the harddisk. I'm not aware of how to reproduce it.
Regards
Signature · 3 lines
Christoph Hoopmann Jabber: [email protected] https://www.0pointer.org/
Karel Zak
maintainerQuoted 1 line · Christoph Hoopmann
seems like I discovered a crash in util-linux-2.25.1:
...
Quoted 2 lines
fdisk:
libfdisk/src/dos.c:1161:add_logical: Assertion 'self_label(cxt)->ext_index' failed
The assert() is nonsense, ext_index=0 is absolutely valid. Sorry. Fixed in master branch, will be in fixed in 2.25.2 too. Thanks!
Quoted 2 lines
During testing of this bug, I noticed a second crash when writing the partition table to the harddisk. I'm not aware of how to reproduce it.
hmm...
Karel
Signature · 2 lines
Karel Zak <[email protected]> http://karelzak.blogspot.com