Received: from list by lists.gnu.org with archive (Exim 4.71) id 1Xm1x6-0001CM-68 for mharc-grub-devel@gnu.org; Wed, 05 Nov 2014 09:52:52 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40261) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xm1wz-00018d-EQ for grub-devel@gnu.org; Wed, 05 Nov 2014 09:52:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xm1wq-0005lI-6e for grub-devel@gnu.org; Wed, 05 Nov 2014 09:52:40 -0500 Received: from mail-wg0-f49.google.com ([74.125.82.49]:53293) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xm1wq-0005l3-0N for grub-devel@gnu.org; Wed, 05 Nov 2014 09:52:36 -0500 Received: by mail-wg0-f49.google.com with SMTP id x13so1090738wgg.8 for ; Wed, 05 Nov 2014 06:52:35 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:subject:message-id:references :mime-version:content-type:content-disposition:in-reply-to :user-agent; bh=eS+T8bKNpxMYWMC2+r+XmvLRh5rYcsME/oX5WuCNRA4=; b=BpPPIlLA6hDEJoDEQit94knG0JB3wUIevPFP/dhH9XrYMZQSV8QYP5amh/LftI1dZT G4+3p+Hm61WRmvlb1I/VzvZHT0BSseud929soI1kjAVDpJCztaEVwUK6JgkA76gmaXFS vlJQl25LEVdYQDy5SLumcro0vlWDMiLczcP96qkUDrtk7LtuvKnSfEwdAO1fH7HEwTls TtZDUrwofgFMEYW5SYPCAXrrSaaNJUEF7452tcxCqrcmAvx8gLKWlt30G65YvYxMHSZ5 LXDD8VWWUoR/81OOSR9rpa6jW5xtGgtIO83aAArdJEYdtu1+6CRjaINa3ldwKsZltKgt SsMg== X-Gm-Message-State: ALoCoQmGj4XlP11Hc5cT6DJqv850hM8i3UPkwV6V1GykSf+YN3hr6CqsvQMLJ0ApR33x3CKtrUNt X-Received: by 10.194.143.7 with SMTP id sa7mr8721065wjb.110.1415199155149; Wed, 05 Nov 2014 06:52:35 -0800 (PST) Received: from bivouac.eciton.net (bivouac.eciton.net. [2a00:1098:0:86:1000:23:0:2]) by mx.google.com with ESMTPSA id gw6sm4849322wib.8.2014.11.05.06.52.33 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 05 Nov 2014 06:52:34 -0800 (PST) Date: Wed, 5 Nov 2014 14:52:32 +0000 From: Leif Lindholm To: The development of GNU GRUB Subject: Re: [PATCH] efi: check *path non-null before grub_strrchr Message-ID: <20141105145232.GE22224@bivouac.eciton.net> References: <20141105125331.GB22224@bivouac.eciton.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 74.125.82.49 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Nov 2014 14:52:50 -0000 On Wed, Nov 05, 2014 at 05:33:40PM +0300, Andrei Borzenkov wrote: > On Wed, Nov 5, 2014 at 3:53 PM, Leif Lindholm wrote: > > The EFI version of grub_machine_get_bootlocation crops the boot image > > name back to the last / in order to get a directory path. However, it > > does not check that *name is actually set before calling grub_strrchr > > to do this, and neither does grub_strrchr before dereferencing a NULL > > pointer. > > > > I wonder - do you actually have firmware that returns empty path? I did (internal development version), and that's being fixed that end too, but more graceful error handling in GRUB would still be nice. / Leif