From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.120; helo=mga04.intel.com; envelope-from=liming.gao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga04.intel.com (mga04.intel.com [192.55.52.120]) (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 7128C21161B05 for ; Sun, 7 Oct 2018 20:09:24 -0700 (PDT) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by fmsmga104.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 07 Oct 2018 20:09:23 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.54,355,1534834800"; d="scan'208";a="76181732" Received: from fmsmsx104.amr.corp.intel.com ([10.18.124.202]) by fmsmga007.fm.intel.com with ESMTP; 07 Oct 2018 20:09:17 -0700 Received: from fmsmsx115.amr.corp.intel.com (10.18.116.19) by fmsmsx104.amr.corp.intel.com (10.18.124.202) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 7 Oct 2018 20:09:17 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by fmsmsx115.amr.corp.intel.com (10.18.116.19) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 7 Oct 2018 20:09:16 -0700 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.48]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.245]) with mapi id 14.03.0319.002; Mon, 8 Oct 2018 11:08:53 +0800 From: "Gao, Liming" To: "Bi, Dandan" , "edk2-devel@lists.01.org" CC: "Zeng, Star" Thread-Topic: [patch] MdeModulePkg/HiiDB: Fix incorrect structure convention for checkbox Thread-Index: AQHUXqZs/f+dGZyRrUOaihq6Kid1ZKUUqyaw Date: Mon, 8 Oct 2018 03:08:52 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E333053@SHSMSX104.ccr.corp.intel.com> References: <20181008012915.5968-1-dandan.bi@intel.com> In-Reply-To: <20181008012915.5968-1-dandan.bi@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 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 03:09:24 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Liming Gao >-----Original Message----- >From: Bi, Dandan >Sent: Monday, October 08, 2018 9:29 AM >To: edk2-devel@lists.01.org >Cc: Gao, Liming ; Zeng, Star >Subject: [patch] MdeModulePkg/HiiDB: Fix incorrect structure convention fo= r >checkbox > >REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D1224 > >When covert IFR binary to EFI_IFR_CHECKBOX structure, >Current code has following incorrect code logic: >IfrCheckBox =3D (EFI_IFR_CHECKBOX *) (IfrOpHdr + 1); >The correct one should be: >IfrCheckBox =3D (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 =3D IfrOpHdr->Scope; > IfrQuestionType =3D IfrOpHdr->OpCode; > IfrQuestionHdr =3D (EFI_IFR_QUESTION_HEADER *) (IfrOpHdr + 1); >- IfrCheckBox =3D (EFI_IFR_CHECKBOX *) (IfrOpHdr + 1); >+ IfrCheckBox =3D (EFI_IFR_CHECKBOX *) IfrOpHdr; > EfiVarStoreIndex =3D IsEfiVarStoreQuestion (IfrQuestionHdr, EfiVarS= toreList, >EfiVarStoreNumber); > Width =3D sizeof (BOOLEAN); > if (EfiVarStoreIndex < EfiVarStoreNumber) { > for (Index =3D 0; Index < DefaultIdNumber; Index ++) { > if (DefaultIdList[Index] =3D=3D EFI_HII_DEFAULT_CLASS_STANDARD)= { >-- >2.18.0.windows.1