All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Roskin <proski@gnu.org>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: [Fwd: Re: Bug#495949: grub-common: grub-probe segfaults]
Date: Fri, 24 Jul 2009 16:09:04 -0400	[thread overview]
Message-ID: <1248466144.6620.16.camel@mj> (raw)
In-Reply-To: <1248461206.3510.76.camel@fz.local>

On Fri, 2009-07-24 at 20:46 +0200, Felix Zielcke wrote:
> And another bug forward
> Anyone has an idea why a dm-crypt/lvm leads to a segfault in the strcmp
> here:
>  grub_partition_iterate (dest_dev->disk, (strcmp (dest_partmap, "pc_partition_map") ?
>                                            find_usable_region_gpt : find_usable_region_msdos));

dest_partmap is only assigned a value in identify_partmap.  If
grub_partition_iterate() doesn't find any partitions, dest_partmap
remains a random pointer.

The fix would be probably to initialize dest_partmap with NULL.  If it
becomes "pc_partition_map", iterate with find_usable_region_msdos, if it
becomes "gpt_partition_map", iterate with find_usable_region_gpt.  If
it's NULL or another string, exit with a warning.

-- 
Regards,
Pavel Roskin



  reply	other threads:[~2009-07-24 20:09 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-24 18:46 [Fwd: Re: Bug#495949: grub-common: grub-probe segfaults] Felix Zielcke
2009-07-24 20:09 ` Pavel Roskin [this message]
2009-07-24 20:33   ` Pavel Roskin
2009-07-24 21:16     ` Vladimir 'phcoder' Serbinenko
2009-07-25 16:38     ` Robert Millan
2009-07-24 20:37   ` Vladimir 'phcoder' Serbinenko
2009-07-24 20:56     ` Pavel Roskin
2009-07-24 21:17       ` Vladimir 'phcoder' Serbinenko
2009-07-25 16:40         ` Robert Millan
2009-07-25  6:51     ` Felix Zielcke

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=1248466144.6620.16.camel@mj \
    --to=proski@gnu.org \
    --cc=grub-devel@gnu.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.