]> git.proxmox.com Git - mirror_edk2.git/commitdiff
BaseTools/GenFfs: Enlarge the size of 'AlignmentBuffer'
authorHao Wu <hao.a.wu@intel.com>
Mon, 18 Dec 2017 07:52:33 +0000 (15:52 +0800)
committerHao Wu <hao.a.wu@intel.com>
Mon, 25 Dec 2017 01:54:44 +0000 (09:54 +0800)
As a workaround for the static code checkers, enlarge the size of the
string buffer 'AlignmentBuffer' so that it can hold all the digits of an
unsigned 32-bit integer plus the size unit character (e.g. 'M' & 'K').

Cc: Yonghong Zhu <yonghong.zhu@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
BaseTools/Source/C/GenFfs/GenFfs.c

index 3b4a9b776164c7533b86b514d844f0b599b06eda..eb40c30ea7b523152d3e22c3cdf49f5de93b089c 100644 (file)
@@ -606,7 +606,12 @@ Returns:
   UINT8                   PeSectionNum;\r
   UINT32                  HeaderSize;\r
   UINT32                  Alignment;\r
-  CHAR8                   AlignmentBuffer[8];\r
+  //\r
+  // Workaround for static code checkers.\r
+  // Ensures the size of 'AlignmentBuffer' can hold all the digits of an\r
+  // unsigned 32-bit integer plus the size unit character.\r
+  //\r
+  CHAR8                   AlignmentBuffer[16];\r
   \r
   //\r
   // Init local variables\r