From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=209.132.183.28; helo=mx1.redhat.com; envelope-from=lersek@redhat.com; receiver=edk2-devel@lists.01.org Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 78A702116327F for ; Mon, 8 Oct 2018 05:18:38 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 0077B308424D; Mon, 8 Oct 2018 12:18:38 +0000 (UTC) Received: from lacos-laptop-7.usersys.redhat.com (ovpn-120-219.rdu2.redhat.com [10.10.120.219]) by smtp.corp.redhat.com (Postfix) with ESMTP id EC9F363BA5; Mon, 8 Oct 2018 12:18:36 +0000 (UTC) To: Dandan Bi , edk2-devel@lists.01.org Cc: Star Zeng , Liming Gao References: <20181008012915.5968-1-dandan.bi@intel.com> From: Laszlo Ersek Message-ID: Date: Mon, 8 Oct 2018 14:18:36 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <20181008012915.5968-1-dandan.bi@intel.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.40]); Mon, 08 Oct 2018 12:18:38 +0000 (UTC) Subject: Re: [patch] MdeModulePkg/HiiDB: Fix incorrect structure convention for checkbox X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Oct 2018 12:18:38 -0000 Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Hi Dandan, On 10/08/18 03:29, Dandan Bi wrote: > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=1224 > > When covert IFR binary to EFI_IFR_CHECKBOX structure, > Current code has following incorrect code logic: > IfrCheckBox = (EFI_IFR_CHECKBOX *) (IfrOpHdr + 1); > The correct one should be: > IfrCheckBox = (EFI_IFR_CHECKBOX *) IfrOpHdr; > > This patch is to fix this bug. > > Cc: Liming Gao > Cc: Star Zeng > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Dandan Bi > --- > MdeModulePkg/Universal/HiiDatabaseDxe/Database.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/Database.c b/MdeModulePkg/Universal/HiiDatabaseDxe/Database.c > index 45448c5198..664687796f 100644 > --- a/MdeModulePkg/Universal/HiiDatabaseDxe/Database.c > +++ b/MdeModulePkg/Universal/HiiDatabaseDxe/Database.c > @@ -896,11 +896,11 @@ UpdateDefaultSettingInFormPackage ( > break; > case EFI_IFR_CHECKBOX_OP: > IfrScope = IfrOpHdr->Scope; > IfrQuestionType = IfrOpHdr->OpCode; > IfrQuestionHdr = (EFI_IFR_QUESTION_HEADER *) (IfrOpHdr + 1); > - IfrCheckBox = (EFI_IFR_CHECKBOX *) (IfrOpHdr + 1); > + IfrCheckBox = (EFI_IFR_CHECKBOX *) IfrOpHdr; > EfiVarStoreIndex = IsEfiVarStoreQuestion (IfrQuestionHdr, EfiVarStoreList, EfiVarStoreNumber); > Width = sizeof (BOOLEAN); > if (EfiVarStoreIndex < EfiVarStoreNumber) { > for (Index = 0; Index < DefaultIdNumber; Index ++) { > if (DefaultIdList[Index] == EFI_HII_DEFAULT_CLASS_STANDARD) { > what were the practical consequences (symptoms) of this issue? Did some checkboxes not work? (I'm asking because SecureBootConfigDxe uses some checkboxes.) Thanks, Laszlo