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.24; helo=mga09.intel.com; envelope-from=jian.j.wang@intel.com; receiver=edk2-devel@lists.01.org Received: from mga09.intel.com (mga09.intel.com [134.134.136.24]) (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 4D5E522198F6C for ; Thu, 28 Dec 2017 17:36:36 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga006.fm.intel.com ([10.253.24.20]) by orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 28 Dec 2017 17:41:33 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,473,1508828400"; d="scan'208";a="190686769" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by fmsmga006.fm.intel.com with ESMTP; 28 Dec 2017 17:41:32 -0800 Received: from shsmsx151.ccr.corp.intel.com (10.239.6.50) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 28 Dec 2017 17:41:32 -0800 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.213]) by SHSMSX151.ccr.corp.intel.com ([169.254.3.218]) with mapi id 14.03.0319.002; Fri, 29 Dec 2017 09:41:28 +0800 From: "Wang, Jian J" To: "Kinney, Michael D" , "edk2-devel@lists.01.org" Thread-Topic: [edk2] [PATCH v2 0/2] Fix error in PrintLib Thread-Index: AQHTf4UDbhJaajSUg0CXzzV3gkWQJ6NY/cAAgACPSmA= Date: Fri, 29 Dec 2017 01:41:28 +0000 Message-ID: References: <20171228023828.18752-1-jian.j.wang@intel.com> In-Reply-To: Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-titus-metadata-40: eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiZTMxNzM5ZDItYWJhMy00ODJiLWE0YmItNDg0NWM4MTZlMDhlIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX05UIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE3LjIuNS4xOCIsIlRydXN0ZWRMYWJlbEhhc2giOiJmaHhrdDJ0aDFRK0dLWDJNVjN3RFUwcUlDcEtKNW5TVGJsbDVjZHJxYnZ0cU91TEp3MU01ckhIMm1JSWJHXC95dSJ9 x-ctpclassification: CTP_NT 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 v2 0/2] Fix error in PrintLib 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, 29 Dec 2017 01:36:36 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Mike, Thanks for catching it. The patch has sent out. Regards, Jian > -----Original Message----- > From: Kinney, Michael D > Sent: Friday, December 29, 2017 9:08 AM > To: Wang, Jian J ; edk2-devel@lists.01.org; Kinney= , > Michael D > Subject: RE: [edk2] [PATCH v2 0/2] Fix error in PrintLib >=20 > Jian, >=20 > This change breaks GCC5 builds. >=20 > /home/mdkinney/tianocore/edk2/MdeModulePkg/Library/DxePrintLibPrint2Pro > tocol/PrintLib.c: In function 'InternalPrintLibSPrintMarker': > /home/mdkinney/tianocore/edk2/MdeModulePkg/Library/DxePrintLibPrint2Pro > tocol/PrintLib.c:2054:71: error: suggest parentheses around '&&' within '= ||' [- > Werror=3Dparentheses] > ArgumentString[Count * BytesPerArgumentCharacter] !=3D '\0' = && >=20 > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~ > Count < Precision || ((Flags & PRECISION) =3D=3D 0); > ~~~~~~~~~~~~~~~~~ >=20 > Mike >=20 > > -----Original Message----- > > From: edk2-devel [mailto:edk2-devel- > > bounces@lists.01.org] On Behalf Of Jian J Wang > > Sent: Wednesday, December 27, 2017 6:38 PM > > To: edk2-devel@lists.01.org > > Subject: [edk2] [PATCH v2 0/2] Fix error in PrintLib > > > > > v2: > > > a. Correct incorrect description in commit log > > > b. Fix another similar issue in the same function > > > c. Fix similar issues in > > MdeModulePkg/DxePrintLibPrint2Protocol > > > > Due to a potential hole in the stop condition of the > > loop, the two continuous > > access to ArgumentString (index, index+1) inside the > > loop might cause the > > string ending character ('\0') and the byte after it to > > be read. > > > > Jian J Wang (2): > > MdePkg/BasePrintLib: Fix error in Precision position > > calculation > > MdeModulePkg/DxePrintLibPrint2Protocol: Fix potential > > string over read > > > > > > MdeModulePkg/Library/DxePrintLibPrint2Protocol/PrintLib > > .c | 7 +++++-- > > MdePkg/Library/BasePrintLib/PrintLibInternal.c > > | 7 +++++-- > > 2 files changed, 10 insertions(+), 4 deletions(-) > > > > -- > > 2.15.1.windows.2 > > > > _______________________________________________ > > edk2-devel mailing list > > edk2-devel@lists.01.org > > https://lists.01.org/mailman/listinfo/edk2-devel