From 33fc1fc46deb3b7779b92228b1c2d0aba2d16e44 Mon Sep 17 00:00:00 2001 From: Hao Wu Date: Mon, 18 Dec 2017 15:52:33 +0800 Subject: [PATCH] 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 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Hao Wu Reviewed-by: Liming Gao --- BaseTools/Source/C/GenFfs/GenFfs.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/BaseTools/Source/C/GenFfs/GenFfs.c b/BaseTools/Source/C/GenFfs/GenFfs.c index 3b4a9b7761..eb40c30ea7 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 -- 2.39.2