]> git.proxmox.com Git - mirror_edk2.git/commitdiff
MdeModulePkg/VarCheckHii: Update data type for variable "ArrayIndex"
authorBi, Dandan <dandan.bi@intel.com>
Tue, 9 Jan 2018 07:24:44 +0000 (15:24 +0800)
committerStar Zeng <star.zeng@intel.com>
Wed, 10 Jan 2018 04:43:20 +0000 (12:43 +0800)
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>
MdeModulePkg/Library/VarCheckHiiLib/VarCheckHiiGen.c

index 0db1383491f75318f988831e197da9ad6f303e4d..debabb5a475003cc2974ee2a52ec4081a465a154 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Var Check Hii bin generation.\r
 \r
-Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -515,7 +515,7 @@ MergeHiiQuestion (
   UINT8                             *Ptr;\r
   UINT8                             *Ptr1;\r
   UINT8                             *Ptr2;\r
-  UINT16                            ArrayIndex;\r
+  UINT                            ArrayIndex;\r
 \r
   //\r
   // Hii Question from Hii Database has high priority.\r
@@ -1064,7 +1064,7 @@ ParseHiiQuestion (
   )\r
 {\r
   VAR_CHECK_HII_QUESTION_HEADER *HiiQuestion;\r
-  UINT16                        ArrayIndex;\r
+  UINT                        ArrayIndex;\r
 \r
   //\r
   // Currently only OneOf, CheckBox and Numeric can be stored in bit field.\r