From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by mx.groups.io with SMTP id smtpd.web08.7536.1666791292095870803 for ; Wed, 26 Oct 2022 06:34:52 -0700 Authentication-Results: mx.groups.io; dkim=fail reason="unable to parse pub key" header.i=@intel.com header.s=intel header.b=AcPKs4co; spf=pass (domain: intel.com, ip: 192.55.52.115, mailfrom: jiewen.yao@intel.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1666791292; x=1698327292; h=from:to:cc:subject:date:message-id:references: in-reply-to:content-transfer-encoding:mime-version; bh=gjlttxszfUHm4sB0yO+e+Wfyye1zZgZ6WuseuK3ORdk=; b=AcPKs4copeutiOLr9SOIGG+OJkP0SqPrewSFEsNn8FquPohnB3lA7+V2 mQ/UH3mBgTBNJoNFswlFOIgNSGOyhlmftXnKZmLgIxK7BcrHdKzUlJoSN 4i0V4WI2NYtj/Nvp7nc+v3mYVlrcBvKiaE3vnUXRnC7zg4O8YSjvD6LyG FmAYJDGGZwyk1Tsjfr6XMwf5D3wok7WJllwm4CJRRXYwpBNyFOJ8+2vaa twji6vThTBCkWNaXZycSVQ4zbr0edk5QnJaPfHPu2SavU0SZTuzU0o1a+ rKDCrilPmjX1qeFJtX/8j90aAp6L3ttzK733QJAWqTRZ6warjI7oRAC1b w==; X-IronPort-AV: E=McAfee;i="6500,9779,10512"; a="307938551" X-IronPort-AV: E=Sophos;i="5.95,214,1661842800"; d="scan'208";a="307938551" Received: from orsmga008.jf.intel.com ([10.7.209.65]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 26 Oct 2022 06:34:41 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10512"; a="663197211" X-IronPort-AV: E=Sophos;i="5.95,214,1661842800"; d="scan'208";a="663197211" Received: from orsmsx601.amr.corp.intel.com ([10.22.229.14]) by orsmga008.jf.intel.com with ESMTP; 26 Oct 2022 06:34:41 -0700 Received: from orsmsx610.amr.corp.intel.com (10.22.229.23) by ORSMSX601.amr.corp.intel.com (10.22.229.14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Wed, 26 Oct 2022 06:34:41 -0700 Received: from ORSEDG601.ED.cps.intel.com (10.7.248.6) by orsmsx610.amr.corp.intel.com (10.22.229.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31 via Frontend Transport; Wed, 26 Oct 2022 06:34:41 -0700 Received: from NAM02-DM3-obe.outbound.protection.outlook.com (104.47.56.44) by edgegateway.intel.com (134.134.137.102) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2375.31; Wed, 26 Oct 2022 06:34:40 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bGOCresEjUFak8kZTXNaL3I/0E0W0lxgfVoTQ9tURXC3NvuJC9rfFfzeCPxtPwZFVKL4/vV8WcjT4QlrpKH0mBUFlXd1pm7HMvs5+4Z92mIF51uOKc75GmDxdv2K/vW2i2nCoEo1zoFre09pXITa8MWd3hbUvt1+z8YYC1GR2/mvFbtjTNRAmCM18DpHCl30O+/8vjNtwZhSLYE+FXjWsHoBk76UktN/5QZFqMKQa0oSffVQ8sltOZopdZL5seAeRodrDEsmdT6JFZqbMh2IQfraOBUPPvko4eaxLNgWVs/fOACvdkQvaSdrYGvwcbZdg7G8ydZelbiF2tp0UcYWvQ== 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=gjlttxszfUHm4sB0yO+e+Wfyye1zZgZ6WuseuK3ORdk=; b=B4d74g3amrp5KrCLgE76XD22M1M0t5spuVL127Ripm2jzOqe2pwuOt68+6UNcn4F7c9Gopldea2cLjP9wwKkix9NuM1nCtdN3hdR6GBJPnBgXq07lKjkEpjzRsAeea298o4+d51YlpjgJ1AKH1w3KHy331Ji28pimNWPAVH2a00zuW0plTaP+pgmwF907cJcfXrbfWdkOT41dFYiHsa57lwCqp03dfVkMCqb8YXho+NPGr5TggBb4SvFzwyBdJQNaUVyDz9L83uEI0FFZYLRJ8iEG3JNgcvk8/1lLQuJZ6lHZHL1NET35pt77V2X1CV0+zv/qB89Orcqk0EfQ5cYUA== 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 MW4PR11MB5872.namprd11.prod.outlook.com (2603:10b6:303:169::14) by DM6PR11MB4676.namprd11.prod.outlook.com (2603:10b6:5:2a7::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.25; Wed, 26 Oct 2022 13:34:38 +0000 Received: from MW4PR11MB5872.namprd11.prod.outlook.com ([fe80::8a27:e262:8996:473]) by MW4PR11MB5872.namprd11.prod.outlook.com ([fe80::8a27:e262:8996:473%7]) with mapi id 15.20.5723.033; Wed, 26 Oct 2022 13:34:38 +0000 From: "Yao, Jiewen" To: "Kinney, Michael D" , Pedro Falcato , "devel@edk2.groups.io" CC: Vitaly Cheptsov , =?utf-8?B?TWFydmluIEjDpHVzZXI=?= , "Gao, Liming" , "Liu, Zhiguang" Subject: Re: [PATCH v2 1/1] MdePkg/BaseLib: Fix out-of-bounds reads in SafeString Thread-Topic: [PATCH v2 1/1] MdePkg/BaseLib: Fix out-of-bounds reads in SafeString Thread-Index: AQHY6I4Be8CLyedOeEGi6KA3QY4gw64grYRA Date: Wed, 26 Oct 2022 13:34:38 +0000 Message-ID: References: <20221024224324.26540-1-pedro.falcato@gmail.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-version: 11.6.500.17 dlp-product: dlpe-windows dlp-reaction: no-action authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=intel.com; x-ms-publictraffictype: Email x-ms-traffictypediagnostic: MW4PR11MB5872:EE_|DM6PR11MB4676:EE_ x-ms-office365-filtering-correlation-id: a04c8079-558a-496b-c8ea-08dab756d499 x-ld-processed: 46c98d88-e344-4ed4-8496-4ed7712e255d,ExtAddr x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: XmZC58LV2eaowZhnIXuo+pA+Wf10/4zTR++4CepqLnix3gVlk6hxxIq80Dy3jGJHjK+KOcix4qO1DCIi+feLsE9yQ6n6FwAqG5wx8Xz8Rdo4G0sQuvCO9yvcNCijyjCWMas/IMzsyN6boOiGGKJOSF1+BRcmHv+4vT2h7UzarBc1ENYsgZ0qqL4r/N2WgNeN7HKw5fjI+bkmgeXxIUMG/NrSJvyDqj5G7atrfRFaPfg//Li5+byeQxmy2uY/YH9UY0bazwjpcNq1/CnguIUiH/ZbmCTa8oPe+l7ENDqRxLvHu/KJfK9f4dvo11Y+ycYgSdFU+L7V7KfSVj1+b3KODpQwABX1QBki+if07PZEKRX6oB4HEdty2MJKVA0a+6DZSxxGSIsa78lC9yuHV7xVf1OHDyACxH6kCU9k5GTfzI0EV/d0XFJuJI5wFf9YfsmX5UI+N0IsVurJQu54m0p7fQTgF0qV1Ly9eGVyYj2F1rF8PdM+kHE/wmx7VqBxW9fAXMJgMcXOwHorouWZTqBYabd96DxCn3LbTwKZmWdIkiRrufVDLd8LUOy1fULua4QtAZLsMuCC7UbtyLjWy/py2UqNn43iK7N//jkW2DPJc7EzG6zxj+KyXBULyI6ug+iGz+RnHe+5SecroQUwE+v47EIN29W7KnZwQTpi8JBdOXaQbYmfnCaVi5c+DEBenf0cC2kuCNGi7ocGCbFXXG7n5EEygVXRmhQRZU8lfGCPlrtGwg0l8zuy7veM8yE3q0d7pNYvwGMdR/rEa6w0Af2Dbw== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:MW4PR11MB5872.namprd11.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(376002)(39860400002)(366004)(396003)(346002)(136003)(451199015)(52536014)(2906002)(66476007)(54906003)(110136005)(55016003)(316002)(8936002)(19627235002)(107886003)(33656002)(6506007)(76116006)(66556008)(26005)(5660300002)(4326008)(8676002)(53546011)(66446008)(82960400001)(38070700005)(64756008)(71200400001)(478600001)(41300700001)(7696005)(38100700002)(122000001)(86362001)(186003)(9686003)(83380400001)(66946007);DIR:OUT;SFP:1102; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?utf-8?B?UDN3RElHWmF6dlFoK0RUN3NHc2RLNmN6T0laTjdXbmxlVWV5LzE0d0JFUWVQ?= =?utf-8?B?aVhyUVFPaEZ0TTZNcW9JNE5mWjZSMVVDQTlkRFdaT3ExZk5VTVF4Tjc3cVcv?= =?utf-8?B?bGpVRnh6bkxOZGIrNGpKWVhlZWdrTHIyTmxGT21OSnhiUmcwdFBiYVRlWWNZ?= =?utf-8?B?S09uNTRCSVZMZlFKbHNLdFFDK0lZWWdCQjFoN0Fsc2F2VUFHYmJTYjJFS1lP?= =?utf-8?B?QVFjS0lzYU01RUNiakwyei8rcFY0T3p4ZXRsS3VRcnI0NVk5TW9iTGxSSjFR?= =?utf-8?B?NDF0d2IwcUVDSkEyL1pYL1VZc2JlRW5PVUZmTEZqWVhkVGRILzFvYXRrOVRR?= =?utf-8?B?RzJWb3YrQmVmWnFuVmN4SkdqRm5VYm0ydUNjS095NXRUZUZzWU1zY2IrOSt6?= =?utf-8?B?NGFMMWF5RGd6T3pTNk8yY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NHBrYXZBZC92VW16MC9BUUs5bUFvTitPOHN1bUlSUGRJ?= =?utf-8?B?RkxTTU82MGtmWEtHOE4vRWJWY0xTRTFLYXpqNS9BcDBKOHZGVSs1cW5xV2Fy?= =?utf-8?B?dzV6RDNOQVp1Und3L3ZtQnJGSE9nVEVjTHN4VFYwcUFFRTBDY1p3VWR5TVMz?= =?utf-8?B?TlovNjE1YnljbmxGdnFYZ2RYS2FTS1RiRU01NWFiNFk4TVZhazQrVGZZODNu?= =?utf-8?B?a01kN0JDZ1lkanRjamVmOWhXUllQTXM1WDlyTjArTGRsZ2t1eWhqejdVb3Mw?= =?utf-8?B?amdmeDNOa1d5MTB4NVh6NktYNDFLVitJdEpoNGZIaEM3ZzFzL1hGMVVicWZr?= =?utf-8?B?djVrYlBzRVNkQ1dCc2FkMnljY3B4c1VVc3pVdVh4N1dVcFRQVllWQjEzYk0r?= =?utf-8?B?aXNSTm5vV3hhcGpLM015UkNYTy9NYjZ0b1phcVZCT1c4SGVhZG1ld3hMY3kz?= =?utf-8?B?U3UxRXFZZUZYdDB0SEkrSWlIN0NVSVdSSjM1N0FhOFdiZXJoVmcxK3lZdk9V?= =?utf-8?B?VTBWUDY5ZXVUQUZzdTRTSWxudHpLUTBmT3kzQVhEb1p6akF5c2k2dFpha2tV?= =?utf-8?B?REZhMFRPR1BSdDUrb204dUo1MFg3UGl2UWpLL1RFNXJMRHM2cGxaSlkxK2hu?= =?utf-8?B?N09FOVpzNkM4a2p0dGJRcksvM3VxQWJlSzgxaDlRekpzajFkRTkwQm1ycHRX?= =?utf-8?B?S1o5ZnJBZmtZc2lURnQ5Q21WWVgrenowMGsrM29wYmNkanVIR2lVZ0V0dDRI?= =?utf-8?Q?i7cAZ3VtIriPhOP9jT4obf2FD?= MIME-Version: 1.0 X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: MW4PR11MB5872.namprd11.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: a04c8079-558a-496b-c8ea-08dab756d499 X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Oct 2022 13:34:38.8108 (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: bOV47aJMUbgj1Z19ug8Ieuvmfumdri/S/QPmQSntXao4dD86NsIcNThQ1tl0/nD648OzjQeo6r7lskLCVqyKOg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR11MB4676 Return-Path: jiewen.yao@intel.com X-OriginatorOrg: intel.com Content-Language: en-US Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 VGhhdCBpcyBnb29kIGNhdGNoLg0KDQpSZXZpZXdlZC1ieTogSmlld2VuIFlhbyA8Smlld2VuLnlh b0BJbnRlbC5jb20+DQoNCg0KPiAtLS0tLU9yaWdpbmFsIE1lc3NhZ2UtLS0tLQ0KPiBGcm9tOiBL aW5uZXksIE1pY2hhZWwgRCA8bWljaGFlbC5kLmtpbm5leUBpbnRlbC5jb20+DQo+IFNlbnQ6IFdl ZG5lc2RheSwgT2N0b2JlciAyNiwgMjAyMiAxMjoyMyBBTQ0KPiBUbzogUGVkcm8gRmFsY2F0byA8 cGVkcm8uZmFsY2F0b0BnbWFpbC5jb20+OyBkZXZlbEBlZGsyLmdyb3Vwcy5pbw0KPiBDYzogVml0 YWx5IENoZXB0c292IDx2aXQ5Njk2QHByb3Rvbm1haWwuY29tPjsgTWFydmluIEjDpHVzZXINCj4g PG1oYWV1c2VyQHBvc3Rlby5kZT47IEdhbywgTGltaW5nIDxnYW9saW1pbmdAYnlvc29mdC5jb20u Y24+OyBMaXUsDQo+IFpoaWd1YW5nIDx6aGlndWFuZy5saXVAaW50ZWwuY29tPjsgWWFvLCBKaWV3 ZW4gPGppZXdlbi55YW9AaW50ZWwuY29tPg0KPiBTdWJqZWN0OiBS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