]> git.ipfire.org Git - thirdparty/util-linux.git/commit
fdisk: fix segfault on bsd label
authorDavidlohr Bueso <dave@gnu.org>
Fri, 4 May 2012 11:35:32 +0000 (13:35 +0200)
committerKarel Zak <kzak@redhat.com>
Thu, 10 May 2012 09:32:04 +0000 (11:32 +0200)
commit44d2fc819840d821db8dc965decf1f490ae9cc95
tree94202b0b19db37b703adb803f52d3a1528d10959
parent4b1cf29d23c094d70233072c3907613b380e27f0
fdisk: fix segfault on bsd label

Commit 8db8295d824cd0c8cba9385e4635d6e311d69d3f added a regression that causes the program to crash when
touching the partition structure (pte) for BSD/OSF labels. Since DOS has its own initialization function,
allow BSD labels to use it as well.

Steps to reproduce:

$> fdisk bsd.img (obtained from blkid regression test files)
Command (m for help): p
...
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Segmentation fault

Signed-off-by: Davidlohr Bueso <dave@gnu.org>
fdisk/fdisk.c
fdisk/fdiskdoslabel.c
fdisk/fdiskdoslabel.h