From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) (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 A1F9921A16E5F for ; Wed, 17 May 2017 08:30:52 -0700 (PDT) Received: from fmsmga002.fm.intel.com ([10.253.24.26]) by fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 May 2017 08:30:52 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.38,355,1491289200"; d="scan'208";a="1170403831" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by fmsmga002.fm.intel.com with ESMTP; 17 May 2017 08:30:52 -0700 Received: from fmsmsx120.amr.corp.intel.com (10.18.124.208) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 17 May 2017 08:30:49 -0700 Received: from shsmsx103.ccr.corp.intel.com (10.239.4.69) by fmsmsx120.amr.corp.intel.com (10.18.124.208) with Microsoft SMTP Server (TLS) id 14.3.319.2; Wed, 17 May 2017 08:30:49 -0700 Received: from shsmsx102.ccr.corp.intel.com ([169.254.2.246]) by SHSMSX103.ccr.corp.intel.com ([169.254.4.117]) with mapi id 14.03.0319.002; Wed, 17 May 2017 23:30:47 +0800 From: "Gao, Liming" To: Sergei Temerkhanov CC: "edk2-devel@lists.01.org" Thread-Topic: [edk2] [PATCH] MdePkg: Fix undefined behavior on variadic parameters Thread-Index: AQHSzfAyZrqQmCd2hkaaBmjkinJcnqH2aIWQ///wYICAAktw0A== Date: Wed, 17 May 2017 15:30:46 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14D730154@shsmsx102.ccr.corp.intel.com> References: <1494903391-716-1-git-send-email-s.temerkhanov@gmail.com> <1494903391-716-2-git-send-email-s.temerkhanov@gmail.com> <4A89E2EF3DFEDB4C8BFDE51014F606A14D72E8BC@shsmsx102.ccr.corp.intel.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 10.0.102.7 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH] MdePkg: Fix undefined behavior on variadic parameters X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 17 May 2017 15:30:52 -0000 Content-Language: en-US Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 U2VyZ2V5Og0KICBOb3csIFZTIGFuZCBHQ0MgZG9uJ3QgcmVwb3J0IHN1Y2ggaXNzdWUuIEhvdyBk byB5b3UgZmluZCB0aGVtPyBBbmQsIHRoaXMgY2hhbmdlIG1vZGlmaWVzIHRoZSBmdW5jdGlvbiBB UEksIGRvZXMgaXQgaW1wYWN0IHRoZSBjb25zdW1lciBjb2RlPw0KDQpUaGFua3MNCkxpbWluZw0K PiAtLS0tLU9yaWdpbmFsIE1lc3NhZ2UtLS0tLQ0KPiBGcm9tOiBTZXJnZWkgVGVtZXJraGFub3Yg W21haWx0bzpzLnRlbWVya2hhbm92QGdtYWlsLmNvbV0NCj4gU2VudDogVHVlc2RheSwgTWF5IDE2 LCAyMDE3IDg6MTEgUE0NCj4gVG86IEdhbywgTGltaW5nIDxsaW1pbmcuZ2FvQGludGVsLmNvbT4N Cj4gQ2M6IGVkazItZGV2ZWxAbGlzdHMuMDEub3JnDQo+IFN1YmplY3Q6IFJlOiBbZWRrMl0gW1BB VENIXSBNZGVQa2c6IEZpeCB1bmRlZmluZWQgYmVoYXZpb3Igb24gdmFyaWFkaWMgcGFyYW1ldGVy cw0KPiANCj4gT24gVHVlLCBNYXkgMTYsIDIwMTcgYXQgODoxMCBBTSwgR2FvLCBMaW1pbmcgPGxp bWluZy5nYW9Aa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