From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga18.intel.com (mga18.intel.com [134.134.136.126]) by mx.groups.io with SMTP id smtpd.web12.10921.1572833463397200124 for ; Sun, 03 Nov 2019 18:11:03 -0800 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.126, mailfrom: liming.gao@intel.com) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Nov 2019 18:11:02 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,265,1569308400"; d="scan'208";a="284831769" Received: from fmsmsx107.amr.corp.intel.com ([10.18.124.205]) by orsmga001.jf.intel.com with ESMTP; 03 Nov 2019 18:11:02 -0800 Received: from fmsmsx115.amr.corp.intel.com (10.18.116.19) by fmsmsx107.amr.corp.intel.com (10.18.124.205) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 3 Nov 2019 18:11:02 -0800 Received: from shsmsx108.ccr.corp.intel.com (10.239.4.97) by fmsmsx115.amr.corp.intel.com (10.18.116.19) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 3 Nov 2019 18:11:02 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.127]) by SHSMSX108.ccr.corp.intel.com ([169.254.8.41]) with mapi id 14.03.0439.000; Mon, 4 Nov 2019 10:11:00 +0800 From: "Liming Gao" To: "devel@edk2.groups.io" , "Gao, Liming" , "Marvin.Haeuser@outlook.com" CC: "vit9696@protonmail.com" , "Kinney, Michael D" Subject: Re: [edk2-devel] [PATCH] MdePkg/UefiDebugLibStdErr: Pass the correct buffer size Thread-Topic: [edk2-devel] [PATCH] MdePkg/UefiDebugLibStdErr: Pass the correct buffer size Thread-Index: AQHVh2vABaEqdpAiHUamLU6PzbHBbqdka7NQgBXvpPA= Date: Mon, 4 Nov 2019 02:11:00 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E53696D@SHSMSX104.ccr.corp.intel.com> References: <15CF8AE5AC785DF0.32129@groups.io> In-Reply-To: <15CF8AE5AC785DF0.32129@groups.io> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Return-Path: liming.gao@intel.com Content-Language: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Push @ 787c4baace1c0c49fa1628990402be8997294d17 >-----Original Message----- >From: devel@edk2.groups.io [mailto:devel@edk2.groups.io] On Behalf Of >Liming Gao >Sent: Monday, October 21, 2019 11:12 AM >To: Marvin.Haeuser@outlook.com; devel@edk2.groups.io >Cc: vit9696@protonmail.com; Kinney, Michael D >Subject: Re: [edk2-devel] [PATCH] MdePkg/UefiDebugLibStdErr: Pass the >correct buffer size > >Reviewed-by: Liming Gao > >>-----Original Message----- >>From: Marvin H=E4user [mailto:Marvin.Haeuser@outlook.com] >>Sent: Monday, October 21, 2019 1:28 AM >>To: devel@edk2.groups.io >>Cc: vit9696@protonmail.com; Kinney, Michael D >>; Gao, Liming >>Subject: [PATCH] MdePkg/UefiDebugLibStdErr: Pass the correct buffer size >> >>From: Marvin Haeuser >> >>REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2302 >> >>The second argument of "UnicodeVSPrintAsciiFormat" is "BufferSize", >>which takes the size of the buffer in bytes. Replace the currently >>used MAX_DEBUG_MESSAGE_LENGTH usage, which is the buffer's length, >>with the actual buffer size. >> >>Cc: Michael D Kinney >>Cc: Liming Gao >>Signed-off-by: Marvin Haeuser >>--- >> MdePkg/Library/UefiDebugLibStdErr/DebugLib.c | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >>diff --git a/MdePkg/Library/UefiDebugLibStdErr/DebugLib.c >>b/MdePkg/Library/UefiDebugLibStdErr/DebugLib.c >>index 40eb697e7e2c..fcfdafede08f 100644 >>--- a/MdePkg/Library/UefiDebugLibStdErr/DebugLib.c >>+++ b/MdePkg/Library/UefiDebugLibStdErr/DebugLib.c >>@@ -106,9 +106,9 @@ DebugPrintMarker ( >> // Convert the DEBUG() message to a Unicode String >> >> // >> >> if (BaseListMarker =3D=3D NULL) { >> >>- UnicodeVSPrintAsciiFormat (Buffer, MAX_DEBUG_MESSAGE_LENGTH, >>Format, VaListMarker); >> >>+ UnicodeVSPrintAsciiFormat (Buffer, sizeof (Buffer), Format, >>VaListMarker); >> >> } else { >> >>- UnicodeBSPrintAsciiFormat (Buffer, MAX_DEBUG_MESSAGE_LENGTH, >>Format, BaseListMarker); >> >>+ UnicodeBSPrintAsciiFormat (Buffer, sizeof (Buffer), Format, >>BaseListMarker); >> >> } >> >> >> >> // >> >>-- >>2.23.0.windows.1 > > >