diff options
author | Davidlohr Bueso | 2012-05-04 13:35:32 +0200 |
---|---|---|
committer | Karel Zak | 2012-05-10 11:32:04 +0200 |
commit | 44d2fc819840d821db8dc965decf1f490ae9cc95 (patch) | |
tree | 94202b0b19db37b703adb803f52d3a1528d10959 /fdisk/fdiskdoslabel.c | |
parent | uuidd: remove unnecessary variables (diff) | |
download | kernel-qcow2-util-linux-44d2fc819840d821db8dc965decf1f490ae9cc95.tar.gz kernel-qcow2-util-linux-44d2fc819840d821db8dc965decf1f490ae9cc95.tar.xz kernel-qcow2-util-linux-44d2fc819840d821db8dc965decf1f490ae9cc95.zip |
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>
Diffstat (limited to 'fdisk/fdiskdoslabel.c')
-rw-r--r-- | fdisk/fdiskdoslabel.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fdisk/fdiskdoslabel.c b/fdisk/fdiskdoslabel.c index c6e4198dd..4dfe876dc 100644 --- a/fdisk/fdiskdoslabel.c +++ b/fdisk/fdiskdoslabel.c @@ -54,7 +54,7 @@ static void clear_partition(struct partition *p) set_nr_sects(p,0); } -static void dos_init(void) +void dos_init(void) { int i; |