From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.65; helo=mga03.intel.com; envelope-from=liming.gao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga03.intel.com (mga03.intel.com [134.134.136.65]) (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 3C5D42235228A for ; Thu, 1 Mar 2018 18:51:29 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga103.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 01 Mar 2018 18:57:37 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.47,409,1515484800"; d="scan'208";a="30853291" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by FMSMGA003.fm.intel.com with ESMTP; 01 Mar 2018 18:57:37 -0800 Received: from fmsmsx116.amr.corp.intel.com (10.18.116.20) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 1 Mar 2018 18:57:37 -0800 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx116.amr.corp.intel.com (10.18.116.20) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 1 Mar 2018 18:57:37 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.125]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.253]) with mapi id 14.03.0319.002; Fri, 2 Mar 2018 10:57:35 +0800 From: "Gao, Liming" To: "Ni, Ruiyu" , "edk2-devel@lists.01.org" Thread-Topic: [PATCH] MdeModulePkg/DebugLibReportStatusCode: Fix hang if format is too long Thread-Index: AQHTsSddv3S33dq3xkimaUv7GiZxs6O8QgqQ Date: Fri, 2 Mar 2018 02:57:35 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E1D5F49@SHSMSX104.ccr.corp.intel.com> References: <20180301063428.164164-1-ruiyu.ni@intel.com> In-Reply-To: <20180301063428.164164-1-ruiyu.ni@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: dlp-product: dlpe-windows dlp-version: 11.0.0.116 dlp-reaction: no-action x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH] MdeModulePkg/DebugLibReportStatusCode: Fix hang if format is too long X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Mar 2018 02:51:29 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Liming Gao > -----Original Message----- > From: Ni, Ruiyu > Sent: Thursday, March 1, 2018 2:34 PM > To: edk2-devel@lists.01.org > Cc: Gao, Liming > Subject: [PATCH] MdeModulePkg/DebugLibReportStatusCode: Fix hang if forma= t is too long >=20 > The previous commit 137ed15511e2045a7333e33ae7f1e873ce1961dd > * MdeModulePkg/DebugLib: Print partial when format string is too long > copies partial format string to DEBUG_INFO buffer but when parsing > the format modifier, the original format string is still used. >=20 > The patch fixes this issue. >=20 > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Ruiyu Ni > Cc: Liming Gao > --- > MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/DebugLib.c | 5 +++++ > 1 file changed, 5 insertions(+) >=20 > diff --git a/MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/DebugLib= .c > b/MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/DebugLib.c > index 16a1d206fb..96c9b30987 100644 > --- a/MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/DebugLib.c > +++ b/MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/DebugLib.c > @@ -126,6 +126,11 @@ DebugPrint ( > // Here we will process the variable arguments and pack them in this a= rea. > // > VA_START (VaListMarker, Format); > + > + // > + // Use the actual format string. > + // > + Format =3D FormatString; > for (; *Format !=3D '\0'; Format++) { > // > // Only format with prefix % is processed. > -- > 2.16.1.windows.1