Received: from list by lists.gnu.org with archive (Exim 4.71) id 1fx8Za-0000a1-3K for mharc-grub-devel@gnu.org; Tue, 04 Sep 2018 06:28:38 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:37103) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fx8ZY-0000Z3-Eh for grub-devel@gnu.org; Tue, 04 Sep 2018 06:28:37 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fx8ZV-00051c-P7 for grub-devel@gnu.org; Tue, 04 Sep 2018 06:28:36 -0400 Received: from dibed.net-space.pl ([84.10.22.86]:42778) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_3DES_EDE_CBC_SHA1:24) (Exim 4.71) (envelope-from ) id 1fx8ZV-00050v-DG for grub-devel@gnu.org; Tue, 04 Sep 2018 06:28:33 -0400 Received: (from localhost user: 'dkiper' uid#4000 fake: STDIN (dkiper@dibed.net-space.pl)) by router-fw-old.i.net-space.pl id S1864882AbeIDK15 (ORCPT ); Tue, 4 Sep 2018 12:27:57 +0200 Date: Tue, 4 Sep 2018 12:27:57 +0200 From: Daniel Kiper To: Julian Andres Klode , mchang@suse.com Cc: grub-devel@gnu.org Subject: Re: [PATCH v2] ofnet: Initialize structs in bootpath parser Message-ID: <20180904102757.GC3271@router-fw-old.i.net-space.pl> References: <20180903080915.20534-1-julian.klode@canonical.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180903080915.20534-1-julian.klode@canonical.com> User-Agent: Mutt/1.3.28i X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 84.10.22.86 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Sep 2018 10:28:37 -0000 On Mon, Sep 03, 2018 at 10:09:15AM +0200, Julian Andres Klode wrote: > Code later on checks if variables inside the struct are > 0 to see if they have been set, like if there were addresses > in the bootpath. > > The variables were not initialized however, so the check > might succeed with uninitialized data, and a new interface > with random addresses and the same name is added. This causes > $net_default_mac to point to the random one, so, for example, > using that variable to load per-mac config files fails. > > Bug-Ubuntu: https://bugs.launchpad.net/bugs/1785859 > Signed-off-by: Julian Andres Klode Reviewed-by: Daniel Kiper Daniel