summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Library/VarCheckHiiLib
diff options
context:
space:
mode:
authorBi, Dandan <dandan.bi@intel.com>2018-01-09 15:24:44 +0800
committerStar Zeng <star.zeng@intel.com>2018-01-10 12:43:20 +0800
commit427b2f41a6e21140fde1ccd900ed228de672ce33 (patch)
tree53389e03b30057117a1db9d69db78f41b5908c88 /MdeModulePkg/Library/VarCheckHiiLib
parent2117989c262d132ace1da033046883a9086f6eac (diff)
downloadedk2-427b2f41a6e21140fde1ccd900ed228de672ce33.zip
edk2-427b2f41a6e21140fde1ccd900ed228de672ce33.tar.gz
edk2-427b2f41a6e21140fde1ccd900ed228de672ce33.tar.bz2
MdeModulePkg/VarCheckHii: Update data type for variable "ArrayIndex"
In some case the ArrayIndex with UINT16 may be not large enough to hold the multiplication result of HiiQuestion->VarOffset * 8; So this patch update the data type to fix this potential issue. Cc: Star Zeng <star.zeng@intel.com> Cc: Liming Gao <liming.gao@intel.com> Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Dandan Bi <dandan.bi@intel.com> Reviewed-by: Star Zeng <star.zeng@intel.com>
Diffstat (limited to 'MdeModulePkg/Library/VarCheckHiiLib')
-rw-r--r--MdeModulePkg/Library/VarCheckHiiLib/VarCheckHiiGen.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/MdeModulePkg/Library/VarCheckHiiLib/VarCheckHiiGen.c b/MdeModulePkg/Library/VarCheckHiiLib/VarCheckHiiGen.c
index 0db1383..debabb5 100644
--- a/MdeModulePkg/Library/VarCheckHiiLib/VarCheckHiiGen.c
+++ b/MdeModulePkg/Library/VarCheckHiiLib/VarCheckHiiGen.c
@@ -1,7 +1,7 @@
/** @file
Var Check Hii bin generation.
-Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -515,7 +515,7 @@ MergeHiiQuestion (
UINT8 *Ptr;
UINT8 *Ptr1;
UINT8 *Ptr2;
- UINT16 ArrayIndex;
+ UINTN ArrayIndex;
//
// Hii Question from Hii Database has high priority.
@@ -1064,7 +1064,7 @@ ParseHiiQuestion (
)
{
VAR_CHECK_HII_QUESTION_HEADER *HiiQuestion;
- UINT16 ArrayIndex;
+ UINTN ArrayIndex;
//
// Currently only OneOf, CheckBox and Numeric can be stored in bit field.