public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* [PATCH 00/17] BaseTools/C: Code refinements
@ 2017-12-19  3:28 Hao Wu
  2017-12-19  3:28 ` [PATCH 01/17] BaseTools/C/Common: Add checks for array access Hao Wu
                   ` (17 more replies)
  0 siblings, 18 replies; 19+ messages in thread
From: Hao Wu @ 2017-12-19  3:28 UTC (permalink / raw)
  To: edk2-devel; +Cc: Hao Wu, Liming Gao, Yonghong Zhu

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 <liming.gao@intel.com>
Cc: Yonghong Zhu <yonghong.zhu@intel.com>

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



^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2017-12-25  1:43 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-12-19  3:28 [PATCH 00/17] BaseTools/C: Code refinements Hao Wu
2017-12-19  3:28 ` [PATCH 01/17] BaseTools/C/Common: Add checks for array access Hao Wu
2017-12-19  3:28 ` [PATCH 02/17] BaseTools/EfiRom: Refine the logic in main() Hao Wu
2017-12-19  3:28 ` [PATCH 03/17] BaseTools/LzmaCompress: Fix possible uninitialized variable Hao Wu
2017-12-19  3:28 ` [PATCH 04/17] BaseTools/C/Common: Remove redundant type cast Hao Wu
2017-12-19  3:29 ` [PATCH 05/17] BaseTools/VfrCompile: Assign 'NULL' for closed file handle Hao Wu
2017-12-19  3:29 ` [PATCH 06/17] BaseTools/GenFv: Add check to ensure the file handle status is correct Hao Wu
2017-12-19  3:29 ` [PATCH 07/17] BaseTools/C/Common: Add/refine boundary checks for strcpy/strcat calls Hao Wu
2017-12-19  3:29 ` [PATCH 08/17] BaseTools/C/Common: Refine using sprintf() with '%s' in format string Hao Wu
2017-12-19  3:29 ` [PATCH 09/17] BaseTools/EfiRom: Add/refine boundary checks for strcpy/strcat calls Hao Wu
2017-12-19  3:29 ` [PATCH 10/17] BaseTools/GenBootSector: Add/refine boundary checks for strcpy/strcat Hao Wu
2017-12-19  3:29 ` [PATCH 11/17] BaseTools/GenFv: Add/refine boundary checks for strcpy/strcat calls Hao Wu
2017-12-19  3:29 ` [PATCH 12/17] BaseTools/GenVtf: " Hao Wu
2017-12-19  3:29 ` [PATCH 13/17] BaseTools/VfrCompile: Add/refine boundary checks for strcpy/strcat Hao Wu
2017-12-19  3:29 ` [PATCH 14/17] BaseTools/VfrCompile: Resolve uninit class variables in constructor Hao Wu
2017-12-19  3:29 ` [PATCH 15/17] BaseTools/GenFfs: Enlarge the size of 'AlignmentBuffer' Hao Wu
2017-12-19  3:29 ` [PATCH 16/17] BaseTools/GenSec: Fix potential memory leak Hao Wu
2017-12-19  3:29 ` [PATCH 17/17] BaseTools/GenSec: Fix potential null pointer dereference Hao Wu
2017-12-25  1:48 ` [PATCH 00/17] BaseTools/C: Code refinements Gao, Liming

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox