public inbox for util-linux@vger.kernel.org
 help / color / mirror / Atom feed
From: Davidlohr Bueso <dave@gnu.org>
To: Francesco Cosoleto <cosoleto@gmail.com>
Cc: Karel Zak <kzak@redhat.com>, util-linux <util-linux@vger.kernel.org>
Subject: Re: [PATCH] fdisk: fix segfault on bsd label
Date: Fri, 04 May 2012 19:08:30 +0200	[thread overview]
Message-ID: <1336151310.13569.0.camel@offworld> (raw)
In-Reply-To: <CAMFXF531o-SWQb3-Hcw02jwVBeYnoN8HLcbPfTPTuPxOHj8QEg@mail.gmail.com>

On Fri, 2012-05-04 at 15:53 +0200, Francesco Cosoleto wrote:
> 2012/5/4 Davidlohr Bueso <dave@gnu.org>:
> > From: Davidlohr Bueso <dave@gnu.org>
> >
> > 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;
> 



  reply	other threads:[~2012-05-04 17:08 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-04 11:35 [PATCH] fdisk: fix segfault on bsd label Davidlohr Bueso
2012-05-04 13:53 ` Francesco Cosoleto
2012-05-04 17:08   ` Davidlohr Bueso [this message]
2012-05-04 18:59     ` Karel Zak
2012-05-10  9:46 ` Karel Zak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1336151310.13569.0.camel@offworld \
    --to=dave@gnu.org \
    --cc=cosoleto@gmail.com \
    --cc=kzak@redhat.com \
    --cc=util-linux@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox