Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MURWD-0002HE-TT for mharc-grub-devel@gnu.org; Fri, 24 Jul 2009 16:37:30 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MURWB-0002EY-Bw for grub-devel@gnu.org; Fri, 24 Jul 2009 16:37:27 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MURW6-0002Af-Pb for grub-devel@gnu.org; Fri, 24 Jul 2009 16:37:26 -0400 Received: from [199.232.76.173] (port=46109 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MURW6-0002AJ-AV for grub-devel@gnu.org; Fri, 24 Jul 2009 16:37:22 -0400 Received: from mail-fx0-f216.google.com ([209.85.220.216]:48805) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MURW5-0006al-RU for grub-devel@gnu.org; Fri, 24 Jul 2009 16:37:22 -0400 Received: by fxm12 with SMTP id 12so1125903fxm.42 for ; Fri, 24 Jul 2009 13:37:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=FzUkskyRxLxA0eSEIjukKIc5gQdt5lSqAHDAGvFrqrc=; b=KG6my8/z39byWBrnujju4xKjREbe/0/vURhFD2xXYcLRHyg3Tf4sfyfjTWPZJ1wAln KZV9nhJxsSQw5c1YGySl37xOBtb6HzhXIJknyqn2d7dZJdwMje/3tJO1sO4PEEacen3S ACC+7s00YBp+4I1hmcWrWfytJ4JP/u82zTZl4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=VYPbq0+o+dvjwqVqNqXdG+c/B8rYNCYWRqLPk94FqO0kscq218sDqLVjnKQgzupcmg fA75Woi3hiTbTQXJYa4TS14WXWPiPXYsvKc5layAoUfMvWiAfU83SW16rhQ1zZ1XdjBu SlYlJU9W3JEFXHelXXwsySdh0EZi8nKUc41YQ= MIME-Version: 1.0 Received: by 10.204.114.140 with SMTP id e12mr141985bkq.68.1248467840875; Fri, 24 Jul 2009 13:37:20 -0700 (PDT) In-Reply-To: <1248466144.6620.16.camel@mj> References: <1248461206.3510.76.camel@fz.local> <1248466144.6620.16.camel@mj> Date: Fri, 24 Jul 2009 22:37:20 +0200 Message-ID: From: "Vladimir 'phcoder' Serbinenko" To: The development of GRUB 2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Re: [Fwd: Re: Bug#495949: grub-common: grub-probe segfaults] X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Jul 2009 20:37:28 -0000 On Fri, Jul 24, 2009 at 10:09 PM, Pavel Roskin wrote: > 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: >> =A0grub_partition_iterate (dest_dev->disk, (strcmp (dest_partmap, "pc_pa= rtition_map") ? >> =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0find_usable_region_gpt : find_usable_region_msdos)); > > dest_partmap is only assigned a value in identify_partmap. =A0If > 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. =A0If it > becomes "pc_partition_map", iterate with find_usable_region_msdos, if it > becomes "gpt_partition_map", iterate with find_usable_region_gpt. =A0If > it's NULL or another string, exit with a warning. Actualy I already fixed this in my patch for installing on partitionless devices. Since there were no oppositions I'll commit it > > -- > Regards, > Pavel Roskin > > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/grub-devel > --=20 Regards Vladimir 'phcoder' Serbinenko Personal git repository: http://repo.or.cz/w/grub2/phcoder.git