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.10925.1572833476542798145 for ; Sun, 03 Nov 2019 18:11:16 -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 fmsmga002.fm.intel.com ([10.253.24.26]) by orsmga106.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 03 Nov 2019 18:11:16 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.68,265,1569308400"; d="scan'208";a="231904989" Received: from fmsmsx105.amr.corp.intel.com ([10.18.124.203]) by fmsmga002.fm.intel.com with ESMTP; 03 Nov 2019 18:11:15 -0800 Received: from fmsmsx118.amr.corp.intel.com (10.18.116.18) by FMSMSX105.amr.corp.intel.com (10.18.124.203) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 3 Nov 2019 18:11:15 -0800 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx118.amr.corp.intel.com (10.18.116.18) with Microsoft SMTP Server (TLS) id 14.3.439.0; Sun, 3 Nov 2019 18:11:15 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.127]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.213]) with mapi id 14.03.0439.000; Mon, 4 Nov 2019 10:11:13 +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/UefiDebugLibConOut: Pass the correct buffer size Thread-Topic: [edk2-devel] [PATCH] MdePkg/UefiDebugLibConOut: Pass the correct buffer size Thread-Index: AQHVhz8Z020yyw6cdECMUbwWeU3acqdkbAKwgBXvvQA= Date: Mon, 4 Nov 2019 02:11:13 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E536982@SHSMSX104.ccr.corp.intel.com> References: <15CF8AE415F70486.7044@groups.io> In-Reply-To: <15CF8AE415F70486.7044@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 @ 5ae6c993ab75c694831547b7436543a41d60458a >-----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/UefiDebugLibConOut: Pass the >correct buffer size > >Reviewed-by: Liming Gao > >>-----Original Message----- >>From: Marvin H=E4user [mailto:Marvin.Haeuser@outlook.com] >>Sent: Sunday, October 20, 2019 8:09 PM >>To: devel@edk2.groups.io >>Cc: vit9696@protonmail.com; Kinney, Michael D >>; Gao, Liming >>Subject: [PATCH] MdePkg/UefiDebugLibConOut: 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/UefiDebugLibConOut/DebugLib.c | 4 ++-- >> 1 file changed, 2 insertions(+), 2 deletions(-) >> >>diff --git a/MdePkg/Library/UefiDebugLibConOut/DebugLib.c >>b/MdePkg/Library/UefiDebugLibConOut/DebugLib.c >>index cf168d05cf21..8ea38ea7cc7c 100644 >>--- a/MdePkg/Library/UefiDebugLibConOut/DebugLib.c >>+++ b/MdePkg/Library/UefiDebugLibConOut/DebugLib.c >>@@ -104,9 +104,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 > > >