From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=40.92.69.33; helo=eur02-ve1-obe.outbound.protection.outlook.com; envelope-from=marvin.haeuser@outlook.com; receiver=edk2-devel@lists.01.org Received: from EUR02-VE1-obe.outbound.protection.outlook.com (mail-oln040092069033.outbound.protection.outlook.com [40.92.69.33]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 932E62118B641 for ; Mon, 5 Nov 2018 04:54:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UVAsThSUwGDKCEImwNaslPDC5V2LZsvwTDvgWlweT5M=; b=eoSS7d9+1H+rKaYbCh8RbWQVW2SunmXss6cmE4MnFGoDC4uXWNIpcmfHnShMxixF+yCUzHdLBy29foeLwe+yvJRVZmEcHXfY9yjS2gAbH1Q4rCi1FCAVhehHObGkhDVNIBThIkUWpre9jgKPixtKClWkKwoOm63Ux7M67cuKuVHfK4y/Go9ZO0BFnXNw1N/0EoDFJYwLxQEsFhF/BGdpQwKa7RzQf9CWkhnF7L9hctoj5LyP/DUQFmffi70W76e4RxPWYFWuiaJWBYbhhGfrCryjlstyoomJ4ozqGelJ9LLeqblK9PeiNSgiBmse4DDGDFt7H5DGq5CRn3Vy1/c6eg== Received: from AM5EUR02FT059.eop-EUR02.prod.protection.outlook.com (10.152.8.54) by AM5EUR02HT169.eop-EUR02.prod.protection.outlook.com (10.152.9.72) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1294.14; Mon, 5 Nov 2018 12:54:45 +0000 Received: from VI1PR0801MB1790.eurprd08.prod.outlook.com (10.152.8.56) by AM5EUR02FT059.mail.protection.outlook.com (10.152.9.204) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.1294.14 via Frontend Transport; Mon, 5 Nov 2018 12:54:44 +0000 Received: from VI1PR0801MB1790.eurprd08.prod.outlook.com ([fe80::342c:bfb5:c08a:e4de]) by VI1PR0801MB1790.eurprd08.prod.outlook.com ([fe80::342c:bfb5:c08a:e4de%9]) with mapi id 15.20.1294.032; Mon, 5 Nov 2018 12:54:44 +0000 From: =?iso-8859-1?Q?Marvin_H=E4user?= To: "edk2-devel@lists.01.org" CC: "michael.d.kinney@intel.com" , "liming.gao@intel.com" Thread-Topic: [PATCH 2/2] MdePkg/UefiDebugLibStdErr: Pass the correct buffer size. Thread-Index: AQHUdQa5v26SZ8WbmkCUwaYPoSP0hA== Date: Mon, 5 Nov 2018 12:54:44 +0000 Message-ID: References: In-Reply-To: Accept-Language: de-DE, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-clientproxiedby: AM6P192CA0051.EURP192.PROD.OUTLOOK.COM (2603:10a6:209:82::28) To VI1PR0801MB1790.eurprd08.prod.outlook.com (2603:10a6:800:5b::15) x-incomingtopheadermarker: OriginalChecksum:FB9439ADB531E7E4A6436D726BB9B990E9FECFD5CFD370030C08E6B61F9C8EEE; UpperCasedChecksum:192D62A73FE54F9A8B6642A1226DAEE3F51E149AA420462722A120C5E8D15586; SizeAsReceived:7629; Count:50 x-ms-exchange-messagesentrepresentingtype: 1 x-tmn: [a2IEVwFltV5HFFIJIAs/jGVrTiRFCPrh] x-ms-publictraffictype: Email x-microsoft-exchange-diagnostics: 1; AM5EUR02HT169; 6:HDt9i6sizqEC3iryVNtlR/EIK/x7uCbotpV/PMMhpxm9Nt2YH76VaMzvutfJwQTXD0qqcXbnfruWado/uAYd0k71hanqKmOgrDgdTfcbk0vHdOWMrkMaCYUA8qjBdIoQueGEX3590ZV4gWnikxz2O9neUjReHSaY/USFAXNGGr9ZQFTPhyRnPLoeQxuWGswnnC/m1qVbysez4nfBougA864QuF8PyW/Hp+qX5LAN5qAxQJuIU2w3OIwDyfiTTvsoouB3eDgJeeIqV5qXnxTsu/4ewRnsvTRR7wRfrygQo+chrbofVbvinDGZ9rk9ZM+2OuMPge1UNeDoA1CB/06s/n4TZRK+r9o+DWAbdB95aWOWVxE6iBvzk+q0KAmVrc9g/m/UBM6/eTzBGO5/gIjlwl2FV3+2aUr14ZCAdwG1Slt/OeeUlL4uGQOzwqmBZ5fBz+rQAsYwABNlFnkyMIiqFg==; 5:CB3qmgVN2fu7TinEZPn6PkmnsegdpVjyIYndSfJ2pDQlqOI2swvhbnq64Mn+Qltq0qvdmstIJ+2d7hV5443bSgs5/zZaoRQ98K5fYfCVkHtIbJbsnKB7fFdiMq6OHPKKNUwu0IZDFXM/jTskUmgsu/9rL37c8bpVs0tUs1f/gSc=; 7:k/NbgXbPeXYDteHSdjVp3lSURjq03SHvAhOZBQsfY9/myJXPgKdgudfK2Djyy8BbQl3Sru8LQBz0UAvITyDWBjNzKtKcSo+RmByYrgW6GXFZlfl1HxCL8DmFWC/wZG3TJQw19doJM1IDeZJSege9yg== x-incomingheadercount: 50 x-eopattributedmessage: 0 x-microsoft-antispam: BCL:0; PCL:0; RULEID:(7020095)(201702061078)(5061506573)(5061507331)(1603103135)(2017031320274)(2017031324274)(2017031323274)(2017031322404)(1601125500)(1603101475)(1701031045); SRVR:AM5EUR02HT169; x-ms-traffictypediagnostic: AM5EUR02HT169: x-exchange-antispam-report-cfa-test: BCL:0; PCL:0; RULEID:(4566010)(82015058); SRVR:AM5EUR02HT169; BCL:0; PCL:0; RULEID:; SRVR:AM5EUR02HT169; x-microsoft-antispam-message-info: QVaWdj7pRzIwQTbscUQCHclKk9rat5bYtMWHiHLE9dhiHTHmc4wadNkdNGBUoFhp MIME-Version: 1.0 X-OriginatorOrg: outlook.com X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 7181d4b0-87d6-4f4e-ba33-0d3746212cec X-MS-Exchange-CrossTenant-Network-Message-Id: 0a79ebce-930b-4622-b307-08d6431ddc0b X-MS-Exchange-CrossTenant-rms-persistedconsumerorg: 7181d4b0-87d6-4f4e-ba33-0d3746212cec X-MS-Exchange-CrossTenant-originalarrivaltime: 05 Nov 2018 12:54:44.8954 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Internet X-MS-Exchange-CrossTenant-id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5EUR02HT169 Subject: [PATCH 2/2] MdePkg/UefiDebugLibStdErr: Pass the correct buffer size. 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, 05 Nov 2018 12:54:48 -0000 Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable The second argument of "UnicodeVSPrintAsciiFormat" is "BufferSize", which takes the size of the buffer in bytes. Replace the currently used MAX_DEBUG_MESSAGE_LENGTH reference, which is the buffer's length, with the actual buffer size. Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Marvin Haeuser --- MdePkg/Library/UefiDebugLibStdErr/DebugLib.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MdePkg/Library/UefiDebugLibStdErr/DebugLib.c b/MdePkg/Library/= UefiDebugLibStdErr/DebugLib.c index 6830a3caa1fe..837fb49b3a21 100644 --- a/MdePkg/Library/UefiDebugLibStdErr/DebugLib.c +++ b/MdePkg/Library/UefiDebugLibStdErr/DebugLib.c @@ -71,7 +71,7 @@ DebugPrint ( // Convert the DEBUG() message to a Unicode String // VA_START (Marker, Format); - UnicodeVSPrintAsciiFormat (Buffer, MAX_DEBUG_MESSAGE_LENGTH, Format, Mar= ker); + UnicodeVSPrintAsciiFormat (Buffer, sizeof (Buffer), Format, Marker); VA_END (Marker); =20 // --=20 2.19.1.windows.1