summaryrefslogtreecommitdiff
path: root/BaseTools
diff options
context:
space:
mode:
authorHao Wu <hao.a.wu@intel.com>2017-12-18 15:52:33 +0800
committerHao Wu <hao.a.wu@intel.com>2017-12-25 09:54:44 +0800
commit33fc1fc46deb3b7779b92228b1c2d0aba2d16e44 (patch)
tree7aebdbda41cffd9b756314daedd832b9035a85e5 /BaseTools
parentb748e35c2bb0b6bcd1d89ef67e8f905b0a1c5c11 (diff)
downloadedk2-33fc1fc46deb3b7779b92228b1c2d0aba2d16e44.zip
edk2-33fc1fc46deb3b7779b92228b1c2d0aba2d16e44.tar.gz
edk2-33fc1fc46deb3b7779b92228b1c2d0aba2d16e44.tar.bz2
BaseTools/GenFfs: Enlarge the size of 'AlignmentBuffer'
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>
Diffstat (limited to 'BaseTools')
-rw-r--r--BaseTools/Source/C/GenFfs/GenFfs.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/BaseTools/Source/C/GenFfs/GenFfs.c b/BaseTools/Source/C/GenFfs/GenFfs.c
index 3b4a9b7..eb40c30 100644
--- a/BaseTools/Source/C/GenFfs/GenFfs.c
+++ b/BaseTools/Source/C/GenFfs/GenFfs.c
@@ -606,7 +606,12 @@ Returns:
UINT8 PeSectionNum;
UINT32 HeaderSize;
UINT32 Alignment;
- CHAR8 AlignmentBuffer[8];
+ //
+ // Workaround for static code checkers.
+ // Ensures the size of 'AlignmentBuffer' can hold all the digits of an
+ // unsigned 32-bit integer plus the size unit character.
+ //
+ CHAR8 AlignmentBuffer[16];
//
// Init local variables