From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) by mx.groups.io with SMTP id smtpd.web12.5775.1645148740934714619 for ; Thu, 17 Feb 2022 17:45:42 -0800 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=UvYbhUSj; spf=pass (domain: intel.com, ip: 192.55.52.93, mailfrom: heng.luo@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1645148740; x=1676684740; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=vpM2aGrdqSDLKRoWjHPjS5occ5W5dDeczcgA3jXmV2E=; b=UvYbhUSjgsbokdUzlN9FimtWXdQA1fUmkb+OiKVaDN77L8NcrBnxlhFW H1KbbTw1TMhSkgXmp1pj3ZvvPDcAGKjJ6IYpwGavN1W+rVgGBata8DLO9 gx2k19c8TvM7/rv/I4jQodp6q7QxB8+LJgiGwAhFCF2R/X5DF04DqeTTs yNYE0MGBAA9PMgC8R+GUmh+Ergf2vAO6Ho8JI+g4xyEHG2IlhwzrVnCmS wzEUK48TzgoSdJKYV1kOFt2NneiSgSVUte6NKfvv45PbwRSG5l9sY8cG+ 9VpAf0ORWfHFQLEzm0fMPMVRv7Uqu5V5rb6GglNG3KGqlU4kpiZTGqQGy w==; X-IronPort-AV: E=McAfee;i="6200,9189,10261"; a="248621581" X-IronPort-AV: E=Sophos;i="5.88,377,1635231600"; d="scan'208";a="248621581" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 17 Feb 2022 17:45:40 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,377,1635231600"; d="scan'208";a="546023418" Received: from fmsmsx605.amr.corp.intel.com ([10.18.126.85]) by orsmga008.jf.intel.com with ESMTP; 17 Feb 2022 17:45:40 -0800 Received: from fmsmsx602.amr.corp.intel.com (10.18.126.82) 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.2308.20; Thu, 17 Feb 2022 17:45:39 -0800 Received: from FMSEDG603.ED.cps.intel.com (10.1.192.133) by fmsmsx602.amr.corp.intel.com (10.18.126.82) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2308.20 via Frontend Transport; Thu, 17 Feb 2022 17:45:39 -0800 Received: from NAM12-BN8-obe.outbound.protection.outlook.com (104.47.55.175) by edgegateway.intel.com (192.55.55.68) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2308.20; Thu, 17 Feb 2022 17:45:39 -0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZtRZPEs3DFCwCM7fgEotOXHkHHdhbs9kXugjlqCtXciXbLHnHakyI1vd3RuOrrMNo4YNP5mR7ThWDcFeXaCdjcE31iDNX86AHJuuKEuRleAksAmGtqnLBrbDiXLepF8nWg3V8uMPuDPBYIaZgEmDbklo2JwkyvfkeyWmxSii0ESy+4DJe0Se8fnB7a9FBKEAdh34b14xLaEhXCklD3xn5eXr9zBP3UCOg42YI0BuSU/Mm4Zm1CLZC63/VZkRrLWouh+U6KdYCOGmyY/Ba1Vw80tH8B3IKdXbH7Ahni7JVVGhaFdFLvvMLYu0No7Lq0/SlrVnJxTg7Y09aztKDkW/TQ== 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-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=NtRJHuM/XhMhfLnG1l7il3p6v1+tlU82xkToC7bGWcY=; b=Mbzu7FLy2En0huVvqKnU84cvVzZWTVy067yb8Cyll6sEQZ9APF+lULvpYEM1/sib8HqjwaA+Q5kZCX4zMJQTRc6lPp4m0WqBhMht667rMrn+LhfJM3OcIEGmw30DI2slZXMidFSLVrUqcyvinhhSvZy/pfX8p3omRRXQ+7paK+Wn5KbrAqJD7WT17+2L+GlNCaA1HUngCe+183xClUUQsWkoszC997a6/weOmJ+gmb1V/NlUqY8vBS0as25AVOpZvjwjpSbdw8eEM7K2lRssjRnJ5csOwnd+UTMaEhpRc8sG/HnwSTMho82av/CKcwdxTGR+YPPfypa1JAhJQM2Q2g== 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 Received: from SN6PR11MB2752.namprd11.prod.outlook.com (2603:10b6:805:59::31) by DM6PR11MB3868.namprd11.prod.outlook.com (2603:10b6:5:19f::13) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4995.17; Fri, 18 Feb 2022 01:45:37 +0000 Received: from SN6PR11MB2752.namprd11.prod.outlook.com ([fe80::dc7c:1e27:3ae1:be2b]) by SN6PR11MB2752.namprd11.prod.outlook.com ([fe80::dc7c:1e27:3ae1:be2b%5]) with mapi id 15.20.4995.017; Fri, 18 Feb 2022 01:45:37 +0000 From: "Heng Luo" To: "devel@edk2.groups.io" , "Luo, Heng" , "Rabeda, Maciej" CC: "Fu, Siyuan" , "Wu, Jiaxin" Subject: Re: [edk2-devel] [PATCH] NetworkPkg: Fix incorrect unicode string of the AKM/Cipher Suite Thread-Topic: [edk2-devel] [PATCH] NetworkPkg: Fix incorrect unicode string of the AKM/Cipher Suite Thread-Index: AQHYEnNeaYypgBKY/0aQtpdbG0SPkKyYrPgw Date: Fri, 18 Feb 2022 01:45:36 +0000 Message-ID: References: <16CDBA029055321D.24088@groups.io> In-Reply-To: <16CDBA029055321D.24088@groups.io> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-reaction: no-action dlp-version: 11.6.200.16 authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 73c49e34-a694-4a8d-a8d8-08d9f2805caa x-ms-traffictypediagnostic: DM6PR11MB3868:EE_ x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:5516; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: eDym7JqaWjfLGHW67DWOa2hip0FNKff/t1zBNdKzT7YdbgTNfzeNNabMQ71fM2ec6hs3O4TraCtSXehJ0jFlufiIxC08vsaTnc2hrG41BvRwWyTRd7VF14Tu8p+mX24lVUBQlyCIhg/k72d/eM3us89sVjlB+zL7xlIbBeZir7M+/xkqp8K/+LjBEDbGRNOg6Xpwtf7Q9g86DJgvQwngzLLQrBGenyBOwRlGgT6YcY/ym+X5BJS24Fa664hOrFIqGhfjUob06vdBLjJIkAoKPPuyQpYBoibbOsiachgiRHZubkJBkfmwsE3xBxf+53d9AqD+l1dKSyFt4X9hfxxjvsu8V8z9lSzTg5Vc7imKFDv2ofJeQC9ORepvHI1qS00g2f1hQDR2CiXAVaNmcVvaNBAGalvegEThSWwmuJn61FzIO5vC2NfFToc4zCJG3LhnQcXyouNOxiWR4wgtdz/q4h6DprBQwVrg4+P8id6CQbPqRH/CdmXO3VuLbpB47ZUMUSRKB2YvqchTMKYFbIrrli+Pa1Rdj1C14LVmtbA6uL8yLwJdz/0dkISOzDnJuY96+qKEPu90EKJvfEXm8Um36RVCgFgTwC56A93Y1DXxZqy7iePDXkba1sF0PckKrPaKTRRDedjWV/nvH8o/b0GAzDrOWzrg2PvoP2M0d3tQ5ERYm3xMBuVSZsdZqanK9N3i65/9m5kFf3J4qZkOqUA1+LreZIc4w63dvlETptjMAVHZYGahkhdulWwIdDh3WCWsGA0YUEfLvbuw/4b8WVhp3MxZ3dysD9XymG7a5FcjOuHSJOs6gtm3iP0TxnGrq9TSdpUs8AMcBdwW3ikcoYwqXQ== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SN6PR11MB2752.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(366004)(4326008)(8676002)(8936002)(86362001)(52536014)(5660300002)(38100700002)(66556008)(66946007)(76116006)(38070700005)(66476007)(316002)(6636002)(54906003)(64756008)(82960400001)(66446008)(122000001)(110136005)(83380400001)(508600001)(53546011)(7696005)(6506007)(26005)(186003)(71200400001)(107886003)(9686003)(966005)(2906002)(55016003)(33656002);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?fFzfMLCz+/8Js5eBdwv9ZPT/WUkXnjwrBabQ60aTUMWXuydur1zB8cE1E91x?= =?us-ascii?Q?iXLUoINIJo7KFJ8VL3ywY1jiZoV+cjAotph27uL254CzcC8Pt9t1aA4qEsV3?= =?us-ascii?Q?kN86kzZpqfnNeQv5eZZgPCG2R1urxqP87oolLilJWRCeu7ESSF9W2mEKRQBT?= =?us-ascii?Q?QIDkpGUvFpqi1F3rQzQDob7oBkMOiRlgNKJiuXWsI4ith+tpZ5kBu6TaPaDT?= =?us-ascii?Q?f7MvTCnhHBj/s3R9jvNLHJ42dpxkKDJnR7THiYmNucV4yebDj4UHF5W6WOPb?= =?us-ascii?Q?mh9kyK5NcPkP32IYInX/iPGeoXdE/u2cfADhoZmGlZMfG9btp/q2nTliPkJt?= =?us-ascii?Q?+Dh7iTj7Rcfx4Swbk5ukKwsk6iNXOL5BmoZPqROT4SDX7ceFm1NJ7+mN1KeM?= =?us-ascii?Q?iWy68IlLZWLgascqUdnGkf8ksp/G0p+EfbjKz3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6ARLJdf+g6kzayDpKqU55iKOeOkeQEj5RMVBfUimJG?= =?us-ascii?Q?7G7IITBYfEDDkwK+9AnLZlBiMz8FsjD9W8EuqNqGlohpgQLkZ9eq7ke9qklb?= =?us-ascii?Q?iNM52ApGDjjwA48TR9NNTGvLSlcWSuxgVbD7Dq2tB8KBi/f/0Aq+aVBH3X0H?= =?us-ascii?Q?Prln/3u8o0TbS+adgI9Cwr5A9Id5Rh0BrUyNJLlK9Mw4EUpRQgOzbfVVaFR/?= =?us-ascii?Q?24U/wVsEzirK+7+ap4r5/qm5/8qPcq0YB95bfziNE78UBtqsIhaZ5lzjvZg8?= =?us-ascii?Q?VxktqTE1ouGC2GzTnZdQpak=3D?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SN6PR11MB2752.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 73c49e34-a694-4a8d-a8d8-08d9f2805caa X-MS-Exchange-CrossTenant-originalarrivaltime: 18 Feb 2022 01:45:37.2809 (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: LyDrOS8R8t66+lNFNLa/1m4mM9etU8P5P4SayXoXo3B9BHtTeGSqMnVO9q70oP2ahGMRTsmgWEctwu5I6z9bfg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB3868 Return-Path: heng.luo@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Dear maintainers, Could you review this patch? Thanks, heng > -----Original Message----- > From: devel@edk2.groups.io On Behalf Of Heng Luo > Sent: Wednesday, January 26, 2022 1:12 PM > To: devel@edk2.groups.io > Cc: Maciej Rabeda ; Fu, Siyuan > ; Wu, Jiaxin > Subject: [edk2-devel] [PATCH] NetworkPkg: Fix incorrect unicode string of= the > AKM/Cipher Suite >=20 > REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D3813 >=20 > The size of buffer should be 3 CHAR16 for Null-terminated Unicode string. > The first char is the AKM/Cipher Suite number, the second char is ' ', th= e third > char is '\0'. >=20 > Cc: Maciej Rabeda > Cc: Fu Siyuan > Cc: Wu Jiaxin > Signed-off-by: Heng Luo > --- >=20 > NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrHiiConfigAccess.c > | 16 ++++++++++++---- > 1 file changed, 12 insertions(+), 4 deletions(-) >=20 > diff --git > a/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrHiiConfigAccess > .c > b/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrHiiConfigAccess > .c > index b49825bcb7..7cb2bfc281 100644 > --- > a/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrHiiConfigAccess > .c > +++ > b/NetworkPkg/WifiConnectionManagerDxe/WifiConnectionMgrHiiConfigAcce > +++ ss.c > @@ -280,12 +280,16 @@ WifiMgrGetStrAKMList ( > // > // Current AKM Suite is between 1-9 > // > - AKMListDisplay =3D (CHAR16 *)AllocateZeroPool (sizeof (CHAR16) * > AKMSuiteCount * 2); > + AKMListDisplay =3D (CHAR16 *)AllocateZeroPool (sizeof (CHAR16) * > + (AKMSuiteCount * 2 + 1)); > if (AKMListDisplay !=3D NULL) { > for (Index =3D 0; Index < AKMSuiteCount; Index++) { > + // > + // The size of buffer should be 3 CHAR16 for Null-terminated Uni= code > string. > + // The first char is the AKM Suite number, the second char is ' = ', the third > char is '\0'. > + // > UnicodeSPrint ( > AKMListDisplay + (Index * 2), > - sizeof (CHAR16) * 2, > + sizeof (CHAR16) * 3, > L"%d ", > Profile->Network.AKMSuite->AKMSuiteList[Index].SuiteType > ); > @@ -333,12 +337,16 @@ WifiMgrGetStrCipherList ( > // > // Current Cipher Suite is between 1-9 > // > - CipherListDisplay =3D (CHAR16 *)AllocateZeroPool (sizeof (CHAR16) * > CipherSuiteCount * 2); > + CipherListDisplay =3D (CHAR16 *)AllocateZeroPool (sizeof (CHAR16) * > + (CipherSuiteCount * 2 + 1)); > if (CipherListDisplay !=3D NULL) { > for (Index =3D 0; Index < CipherSuiteCount; Index++) { > + // > + // The size of buffer should be 3 CHAR16 for Null-terminated Uni= code > string. > + // The first char is the Cipher Suite number, the second char is= ' ', the third > char is '\0'. > + // > UnicodeSPrint ( > CipherListDisplay + (Index * 2), > - sizeof (CHAR16) * 2, > + sizeof (CHAR16) * 3, > L"%d ", > Profile->Network.CipherSuite->CipherSuiteList[Index].SuiteType > ); > -- > 2.31.1.windows.1 >=20 >=20 >=20 >=20 >=20