From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) by mx.groups.io with SMTP id smtpd.web11.5769.1602044489270008295 for ; Tue, 06 Oct 2020 21:21:29 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@intel.onmicrosoft.com header.s=selector2-intel-onmicrosoft-com header.b=euBJKIMd; spf=pass (domain: intel.com, ip: 134.134.136.24, mailfrom: hao.a.wu@intel.com) IronPort-SDR: YEVUQYynVITvOKRsaJNCpENLQ3ZaMq58pKzkZBdSEIXRrZMjBEUyLE6cEw5iPMOk1/7zblxghd 8DZz6ZqRWriw== X-IronPort-AV: E=McAfee;i="6000,8403,9766"; a="164948865" X-IronPort-AV: E=Sophos;i="5.77,345,1596524400"; d="scan'208,217";a="164948865" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga102.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 06 Oct 2020 21:21:28 -0700 IronPort-SDR: pvLEGUGDPxCmfnLiLZ/KjEKQVEFLCf3L54o8HX699YPXFrwyIdV+oclJHYaXt9WIihSs5o7AN5 YnigwZHDc5gQ== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.77,345,1596524400"; d="scan'208,217";a="348827859" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by fmsmga002.fm.intel.com with ESMTP; 06 Oct 2020 21:21:28 -0700 Received: from fmsmsx611.amr.corp.intel.com (10.18.126.91) by fmsmsx605.amr.corp.intel.com (10.18.126.85) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 6 Oct 2020 21:21:27 -0700 Received: from fmsmsx603.amr.corp.intel.com (10.18.126.83) by fmsmsx611.amr.corp.intel.com (10.18.126.91) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5; Tue, 6 Oct 2020 21:21:27 -0700 Received: from fmsedg602.ED.cps.intel.com (10.1.192.136) by fmsmsx603.amr.corp.intel.com (10.18.126.83) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.1713.5 via Frontend Transport; Tue, 6 Oct 2020 21:21:27 -0700 Received: from NAM02-CY1-obe.outbound.protection.outlook.com (104.47.37.50) by edgegateway.intel.com (192.55.55.71) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.1713.5; Tue, 6 Oct 2020 21:21:26 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QH/xFt2x86YT3WaCpBqbuqXKffvjj9dNC6Cwqz3KTgjWm8axlRPLZ/x3Zyv8yFDqwml0lGPTAbkXy9nQW/4mZYCfa2XMekGD1q/NnHsI2hpCfXARDP+7T1jVxcRWHv0fpOAbSU7WNzxqaeTYOPoBcRDe0ZDRRzAcw082epQ6K++a5L81CRyKBToUzYzDQRHvOIX5D3vze7hGny3ZAa/gpOA1Erh8dUb2c7TBbdjWF2CGhPlsAvldkaIY/aD3idC/WTEqYtwGvhFRzYZ8aGgWHqf9WsaCkmj0lvWUzHlq48M9HUDmOv6s8tfnqqK/xJZHxULIeZhQdjxrBMMuew7H9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lOzmH2zaH14+WoJvpEm9S3PrABD8h/AJ5aZOxZxXfH0=; b=EKln9CokIHK6CMtI9fx3taV8UBwq/ei6aLg+ePum9srsM494GEMe+Xq2c8Y5nMWPDVHwuS+BYvNTnBuuU1TLcdx58+rIR6SMrb93u3hfdYIFcEsA4ABMToGfRsC4JMlBiNzuEErRhkuaeHjWvZUEdkC3K/cy67gSOUWxMmfT9qXc1iHR5N8ufnVD28YA69Mn166Xh8CWRQfD7hA2s5tgnmRZJ8PyOU/7HtDSdCbdIYEZ0T/MM6DWk8xrnLgKf81cXiEf8UN73IhupDuo3WUyIiGuYvWYwR+ZYsuZIMwIfk+KZ/4Q/72gM5uwuBOE6ag3dq/RLdUyiNf+yv5mLQltuw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=intel.com; dmarc=pass action=none header.from=intel.com; dkim=pass header.d=intel.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel.onmicrosoft.com; s=selector2-intel-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=lOzmH2zaH14+WoJvpEm9S3PrABD8h/AJ5aZOxZxXfH0=; b=euBJKIMdZqpBYqc2VEg0EIXPJejvfNR+Q99MT8j7HRVj3LFFuwW0uaIqoJ2dCteR2n4oM03KFOEY+3vH6Q6/CQsGjX0XOqfieBltJ3espsc2+WdXzjMQeNm1DLkYOSNaJA6mvuPVkoahZ816OHaGiM3Hlw9a2L7JHG35DWwaIc8= Received: from BN8PR11MB3666.namprd11.prod.outlook.com (2603:10b6:408:8c::19) by BN6PR1101MB2098.namprd11.prod.outlook.com (2603:10b6:405:52::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3433.36; Wed, 7 Oct 2020 04:21:23 +0000 Received: from BN8PR11MB3666.namprd11.prod.outlook.com ([fe80::c123:faac:1da3:f807]) by BN8PR11MB3666.namprd11.prod.outlook.com ([fe80::c123:faac:1da3:f807%5]) with mapi id 15.20.3433.045; Wed, 7 Oct 2020 04:21:23 +0000 From: "Wu, Hao A" To: "devel@edk2.groups.io" , "jbrasen@nvidia.com" , "Bi, Dandan" CC: "Dong, Eric" Subject: Re: [edk2-devel] [PATCH] MdeModulePkg/HiiDatabase: Do not modify CONST string Thread-Topic: [edk2-devel] [PATCH] MdeModulePkg/HiiDatabase: Do not modify CONST string Thread-Index: AQHWiF5PIy7OcU/ZAkKjWZ6hNHw80qloMlsAgA0X8oCAFGGNgIAB/96A Date: Wed, 7 Oct 2020 04:21:22 +0000 Message-ID: References: <0cb9d71f50baf3c98522b5d20e4083da458050da.1599843970.git.jbrasen@nvidia.com>, In-Reply-To: Accept-Language: en-US, zh-CN X-MS-Has-Attach: X-MS-TNEF-Correlator: msip_labels: MSIP_Label_6b558183-044c-4105-8d9c-cea02a2a3d86_Enabled=True; MSIP_Label_6b558183-044c-4105-8d9c-cea02a2a3d86_SiteId=43083d15-7273-40c1-b7db-39efd9ccc17a; MSIP_Label_6b558183-044c-4105-8d9c-cea02a2a3d86_Owner=jbrasen@nvidia.com; MSIP_Label_6b558183-044c-4105-8d9c-cea02a2a3d86_SetDate=2020-10-05T21:27:14.2096481Z; MSIP_Label_6b558183-044c-4105-8d9c-cea02a2a3d86_Name=Unrestricted; MSIP_Label_6b558183-044c-4105-8d9c-cea02a2a3d86_Application=Microsoft Azure Information Protection; MSIP_Label_6b558183-044c-4105-8d9c-cea02a2a3d86_ActionId=259ba49c-b697-4909-a29a-0031669f44a2; MSIP_Label_6b558183-044c-4105-8d9c-cea02a2a3d86_Extended_MSFT_Method=Automatic dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.5.1.3 authentication-results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=intel.com; x-originating-ip: [192.198.147.218] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: ce845b8f-0976-4dbd-62f7-08d86a787362 x-ms-traffictypediagnostic: BN6PR1101MB2098: x-ms-exchange-transport-forked: True x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:1728; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: RsAIByQShD9OeAcCYU9iERS6ogk539zVF5VijsuEldiCLdugHM/3JwYbW27+FzE0VrI/ejgrZFmHN1tg7iQogGEBTRSVFObMPtnw6N42jXmSsa8t8sFyDGrM14QS1C43mghrTQPqO5kAbgV92Ee1HzoSgOhR3CEMyx/4KqPKq8KR5zLtpjC7BjKVwJLixJ5S9SX/C/9xEy773g/YVed3bxLO5nEkNoPBA1VB6/xnpgJj0XHyJAnAgJj1x8YmZrb/Ld7zqn4cOVGfluqJpG/j9kM62/F4GFESSgTyllWWdxq/yufumRbd19H3AkNPAEiyrCL9+sJTmxLQIwg7FLdIH3TNse2acimKU/Lt5XcbVxRd6qmxTSXLKrs3IaF2ho3xphjxO1wtBoy7N32JbJCktQ== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:BN8PR11MB3666.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(346002)(136003)(39860400002)(396003)(376002)(366004)(478600001)(7696005)(53546011)(6506007)(186003)(26005)(5660300002)(9686003)(4326008)(66946007)(966005)(76116006)(66446008)(64756008)(66556008)(66476007)(52536014)(8676002)(55016002)(6636002)(2906002)(110136005)(33656002)(316002)(86362001)(107886003)(83380400001)(76236003)(83080400001)(166002)(8936002)(71200400001);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata: zbnnzw1VXVy+cd/iK5+4nLHL7pvfkWEjkUdxcXGlvIFKMZXDpYRYSJmaAbvtX2RMC4I9niYGJbSg83B4mIhFfFbZiSBS/YVUaSsH0Vy0/baBnKyM2UgE7ixJPKmzaCNgX8wc6ZGqcF60oi0sfKr/USVr+HW5O8ZTYg+WxwtO41yA2ChPaoYIaO7mYdQt9Uafn445CPujpJYzdnWSqZvo8bji4OBSxj86xZwBS9n6jV43AhN+4qgGRxwnhrblrw9ax4G0M3CLblgdAJcZjHqg6doXTv6PpRB2GgAIcov+Ha0ZhoyOoAlHbxI55mDZ1eh461rKXJ0msaHHIGLxokkKz2y1z+p8rFCiQ/gqskM+iI9Y1IRg71nU3zzxHStKcGbmcIuZ3LgtLn4mtMsQh9dSl3uELrPEGGfsvkJ2opIu6M5Bu02gEiHT3+M2D45uW6SZs5U0WKfEa92l52YlYDzdZoiXvRCe3+b3uulanqt6TrPfbp28M8i2eZV8FiMlu0JmQEGpf4bxCTsLB3cBgvDLSosHZGF4gXe1p0OpUibtRbRsjidY005CvvIsKDOtAzQtSwcPjTjQCLQ/K8MUq5klWIyvBLT2zi0G1Z0ht99XD2x3fcQYlZZJhbGjz96EppzU6NbInKLpdwWse56wtaqBpg== MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: BN8PR11MB3666.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: ce845b8f-0976-4dbd-62f7-08d86a787362 X-MS-Exchange-CrossTenant-originalarrivaltime: 07 Oct 2020 04:21:23.2495 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 46c98d88-e344-4ed4-8496-4ed7712e255d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 9vWY4VHB0IgQLV2YhCKexiA1AwIUHsmos4k89xeudgP+iPdONEusjVUq3bZz21wdc74II+A1JJk3AKOeEhOZUA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BN6PR1101MB2098 Return-Path: hao.a.wu@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_BN8PR11MB366655C6A3440C7B19AF4922CA0A0BN8PR11MB3666namp_" --_000_BN8PR11MB366655C6A3440C7B19AF4922CA0A0BN8PR11MB3666namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Pushed via: PR - https://github.com/tianocore/edk2/pull/987 Commit - c640186ec8aae6164123ee38de6409aed69eab12 Best Regards, Hao Wu From: devel@edk2.groups.io On Behalf Of Jeff Brasen Sent: Tuesday, October 6, 2020 5:27 AM To: Bi, Dandan ; devel@edk2.groups.io Cc: Dong, Eric Subject: Re: [edk2-devel] [PATCH] MdeModulePkg/HiiDatabase: Do not modify = CONST string Are we looking for any other reviews on this? Thanks, Jeff From: Jeff Brasen > Sent: Tuesday, September 22, 2020 4:13 PM To: Bi, Dandan >; devel@ed= k2.groups.io Cc: Dong, Eric > Subject: Re: [PATCH] MdeModulePkg/HiiDatabase: Do not modify CONST string Thanks Dandan, are we waiting for any additional reviews on this change? Thanks, Jeff ________________________________ From: Bi, Dandan > Sent: Monday, September 14, 2020 8:15 AM To: Jeff Brasen >; devel@edk= 2.groups.io > Cc: Dong, Eric > Subject: RE: [PATCH] MdeModulePkg/HiiDatabase: Do not modify CONST string External email: Use caution opening links or attachments Reviewed-by: Dandan Bi > Thanks, Dandan > -----Original Message----- > From: Jeff Brasen > > Sent: Saturday, September 12, 2020 1:09 AM > To: devel@edk2.groups.io > Cc: Bi, Dandan >; Dong, = Eric >; > Jeff Brasen > > Subject: [PATCH] MdeModulePkg/HiiDatabase: Do not modify CONST string > > Update function behavior to not modify the incoming string that is marke= d as > CONST in the prototype. > > Signed-off-by: Jeff Brasen > > --- > .../Universal/HiiDatabaseDxe/ConfigRouting.c | 12 +++++++----- > 1 file changed, 7 insertions(+), 5 deletions(-) > > diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c > b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c > index 2cad6d29f4..d492b769d5 100644 > --- a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c > +++ b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c > @@ -5497,7 +5497,6 @@ HiiBlockToConfig ( > UINTN Index; UINT8 = *TemBuffer; CHAR16 > *TemString;- CHAR16 TemChar; TmpBuffer = = =3D NULL; @@ - > 5564,10 +5563,13 @@ HiiBlockToConfig ( > // // Copy and an additional '&' to //- > TemChar =3D *StringPtr;- *StringPtr =3D '\0';- AppendToMultiString(Con= fig, > ConfigRequest);- *StringPtr =3D TemChar;+ TemString =3D AllocateCopyPo= ol > (sizeof (CHAR16) * (StringPtr - ConfigRequest + 1), ConfigRequest);+ if > (TemString =3D=3D NULL) {+ return EFI_OUT_OF_RESOURCES;+ }+ > TemString[StringPtr - ConfigRequest] =3D '\0';+ AppendToMultiString(Con= fig, > TemString);+ FreePool (TemString); // // Parse each if > exists-- > 2.25.1 --_000_BN8PR11MB366655C6A3440C7B19AF4922CA0A0BN8PR11MB3666namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

Pushed via:

PR - https://github.com/tianocore/edk2/pull/987

Commit - c640186ec8aae6164123ee38de6409aed69eab12

 

Best Regards,

Hao Wu

 

From: devel@edk2.groups.io <devel@edk2.gr= oups.io> On Behalf Of Jeff Brasen
Sent: Tuesday, October 6, 2020 5:27 AM
To: Bi, Dandan <dandan.bi@intel.com>; devel@edk2.groups.io Cc: Dong, Eric <eric.dong@intel.com>
Subject: Re: [edk2-devel] [PATCH] MdeModulePkg/HiiDatabase: Do not = modify CONST string

 

Are we looking for any other reviews on this?<= /o:p>

 

Thanks,

Jeff

 

 

From: Jeff Brasen <jbrasen@nvidia.com>
Sent: Tuesday, September 22, 2020 4:13 PM
To: Bi, Dandan <dandan.bi= @intel.com>; devel@edk2.groups.io
Cc: Dong, Eric <eric.dong= @intel.com>
Subject: Re: [PATCH] MdeModulePkg/HiiDatabase: Do not modify CONST = string

 

Thanks= Dandan, are we waiting for any additional reviews on this change?

&= nbsp;

Thanks,

Jeff


From: Bi, Dandan <dandan.bi@intel.com>
Sent: Monday, September 14, 2020 8:15 AM
To: Jeff Brasen <jbrasen@n= vidia.com>; devel@edk2.groups.io <devel@edk2.groups.io>
Cc: Dong, Eric <eric.dong= @intel.com>
Subject: RE: [PATCH] MdeModulePkg/HiiDatabase: Do not modify CONST = string

 

External email: Use = caution opening links or attachments


Reviewed-by: Dandan Bi <dandan.b= i@intel.com>


Thanks,
Dandan
> -----Original Message-----
> From: Jeff Brasen <jbrasen@n= vidia.com>
> Sent: Saturday, September 12, 2020 1:09 AM
> To: devel@edk2.groups.io<= br> > Cc: Bi, Dandan <dandan.bi@i= ntel.com>; Dong, Eric <eri= c.dong@intel.com>;
> Jeff Brasen <jbrasen@nvidia.= com>
> Subject: [PATCH] MdeModulePkg/HiiDatabase: Do not modify CONST string=
>
> Update function behavior to not modify the incoming string that is ma= rked as
> CONST in the prototype.
>
> Signed-off-by: Jeff Brasen <= jbrasen@nvidia.com>
> ---
>  .../Universal/HiiDatabaseDxe/ConfigRouting.c   &= nbsp;     | 12 +++++++-----
>  1 file changed, 7 insertions(+), 5 deletions(-)
>
> diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c > b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
> index 2cad6d29f4..d492b769d5 100644
> --- a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
> +++ b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c
> @@ -5497,7 +5497,6 @@ HiiBlockToConfig (
>    UINTN       &nbs= p;            &= nbsp;          Index; &nb= sp; UINT8           =             &nb= sp;       *TemBuffer;   CHAR16
> *TemString;-  CHAR16       &n= bsp;            = ;          TemChar;  = ;  TmpBuffer =3D NULL; @@ -
> 5564,10 +5563,13 @@ HiiBlockToConfig (
>    //   // Copy <ConfigHdr> and an add= itional '&' to <ConfigResp>   //-
> TemChar =3D *StringPtr;-  *StringPtr =3D '\0';-  AppendToMu= ltiString(Config,
> ConfigRequest);-  *StringPtr =3D TemChar;+  TemString =3D A= llocateCopyPool
> (sizeof (CHAR16) * (StringPtr - ConfigRequest + 1), ConfigRequest);+&= nbsp; if
> (TemString =3D=3D NULL) {+    return EFI_OUT_OF_RESOUR= CES;+  }+
> TemString[StringPtr - ConfigRequest] =3D '\0';+  AppendToMultiSt= ring(Config,
> TemString);+  FreePool (TemString);    // &n= bsp; // Parse each <RequestElement> if
> exists--
> 2.25.1

--_000_BN8PR11MB366655C6A3440C7B19AF4922CA0A0BN8PR11MB3666namp_--