Re: [PATCH] fdisk: fix segfault on bsd label

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, 2012-05-04 at 15:53 +0200, Francesco Cosoleto wrote:
> 2012/5/4 Davidlohr Bueso <dave@xxxxxxx>:
> > From: Davidlohr Bueso <dave@xxxxxxx>
> >
> > 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
> 
> Thanks Davidlohr for pointing out that regression. Does it occurs with
> the command to print the partition table when the drive has a BSD
> label and hasn't a valid DOS label, and it has no partition? Fdisk
> switches from BSD label to DOS label without initializing DOS
> structures, right?

>From my analysis, yes.

> 
> fdisk.c:
>     bsd_command_prompt();
>     /* If we return we may want to make an empty DOS label? */
>     disklabel = DOS_LABEL;
> 


--
To unsubscribe from this list: send the line "unsubscribe util-linux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Netdev]     [Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux