From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=192.55.52.93; helo=mga11.intel.com; envelope-from=liming.gao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (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 BEC9321CB87AA for ; Sun, 24 Dec 2017 17:43:38 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga001.jf.intel.com ([10.7.209.18]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 24 Dec 2017 17:48:31 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,452,1508828400"; d="scan'208";a="18712104" Received: from fmsmsx108.amr.corp.intel.com ([10.18.124.206]) by orsmga001.jf.intel.com with ESMTP; 24 Dec 2017 17:48:30 -0800 Received: from fmsmsx124.amr.corp.intel.com (10.18.125.39) by FMSMSX108.amr.corp.intel.com (10.18.124.206) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 24 Dec 2017 17:48:30 -0800 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx124.amr.corp.intel.com (10.18.125.39) with Microsoft SMTP Server (TLS) id 14.3.319.2; Sun, 24 Dec 2017 17:48:30 -0800 Received: from shsmsx104.ccr.corp.intel.com ([169.254.5.152]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.159]) with mapi id 14.03.0319.002; Mon, 25 Dec 2017 09:48:27 +0800 From: "Gao, Liming" To: "Wu, Hao A" , "edk2-devel@lists.01.org" Thread-Topic: [PATCH 00/17] BaseTools/C: Code refinements Thread-Index: AQHTeHmSzlufs3KEgkOagqd+puSKwKNTU/Sw Date: Mon, 25 Dec 2017 01:48:27 +0000 Message-ID: <4A89E2EF3DFEDB4C8BFDE51014F606A14E19608B@SHSMSX104.ccr.corp.intel.com> References: <20171219032912.14404-1-hao.a.wu@intel.com> In-Reply-To: <20171219032912.14404-1-hao.a.wu@intel.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [PATCH 00/17] BaseTools/C: Code refinements 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: Mon, 25 Dec 2017 01:43:39 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Reviewed-by: Liming Gao >-----Original Message----- >From: Wu, Hao A >Sent: Tuesday, December 19, 2017 11:29 AM >To: edk2-devel@lists.01.org >Cc: Wu, Hao A ; Gao, Liming ; >Zhu, Yonghong >Subject: [PATCH 00/17] BaseTools/C: Code refinements > >The series refines the C/C++ source codes within BaseTools for the below >catagories: >* Resolve uninitialized: > Local variables and > Class variables in constructor > >* Add/refine boundary checks when accessing (string) buffers. > >* Add/refine status checks for the usage of file handles > >* Remove redundant explicit type casts > >* Resolve possible resource/memory leaks > >* Resolve possible NULL pointer dereferences > >Cc: Liming Gao >Cc: Yonghong Zhu > >Hao Wu (17): > BaseTools/C/Common: Add checks for array access > BaseTools/EfiRom: Refine the logic in main() > BaseTools/LzmaCompress: Fix possible uninitialized variable > BaseTools/C/Common: Remove redundant type cast > BaseTools/VfrCompile: Assign 'NULL' for closed file handle > BaseTools/GenFv: Add check to ensure the file handle status is correct > BaseTools/C/Common: Add/refine boundary checks for strcpy/strcat calls > BaseTools/C/Common: Refine using sprintf() with '%s' in format string > BaseTools/EfiRom: Add/refine boundary checks for strcpy/strcat calls > BaseTools/GenBootSector: Add/refine boundary checks for strcpy/strcat > BaseTools/GenFv: Add/refine boundary checks for strcpy/strcat calls > BaseTools/GenVtf: Add/refine boundary checks for strcpy/strcat calls > BaseTools/VfrCompile: Add/refine boundary checks for strcpy/strcat > BaseTools/VfrCompile: Resolve uninit class variables in constructor > BaseTools/GenFfs: Enlarge the size of 'AlignmentBuffer' > BaseTools/GenSec: Fix potential memory leak > BaseTools/GenSec: Fix potential null pointer dereference > > BaseTools/Source/C/Common/BasePeCoff.c | 12 +++---- > BaseTools/Source/C/Common/CommonLib.c | 24 +++++++++---- > BaseTools/Source/C/Common/Decompress.c | 8 ++--- > BaseTools/Source/C/Common/EfiUtilityMsgs.c | 30 ++++++++--------- > BaseTools/Source/C/Common/SimpleFileParsing.c | 12 +++---- > BaseTools/Source/C/EfiRom/EfiRom.c | 20 +++++++---- > BaseTools/Source/C/GenBootSector/GenBootSector.c | 17 ++++++++-- > BaseTools/Source/C/GenFfs/GenFfs.c | 7 +++- > BaseTools/Source/C/GenFv/GenFv.c | 38 +++++++++++--------= -- > BaseTools/Source/C/GenFv/GenFvInternalLib.c | 26 +++++++++++--- > BaseTools/Source/C/GenSec/GenSec.c | 22 +++++++++++- > BaseTools/Source/C/GenVtf/GenVtf.c | 43 +++++++++++++++++++= +- >--- > BaseTools/Source/C/LzmaCompress/Sdk/C/7zFile.c | 2 +- > BaseTools/Source/C/VfrCompile/VfrCompiler.cpp | 3 +- > BaseTools/Source/C/VfrCompile/VfrError.cpp | 1 + > BaseTools/Source/C/VfrCompile/VfrFormPkg.cpp | 6 ++++ > BaseTools/Source/C/VfrCompile/VfrUtilityLib.cpp | 17 +++++++--- > 17 files changed, 204 insertions(+), 84 deletions(-) > >-- >2.12.0.windows.1