that can cause an exception. mPeiExMapppingTableSize is the table size, but the
code needs to check the entry number.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Samer El-Haj-Mahmoud <elhaj@hp.com>
Reviewed-by: Star Zeng <star.zeng@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@16448
6f19259b-4bc3-4df7-8a09-
765794883524
/** @file\r
Help functions used by PCD DXE driver.\r
\r
/** @file\r
Help functions used by PCD DXE driver.\r
\r
+Copyright (c) 2014, Hewlett-Packard Development Company, L.P.<BR>\r
Copyright (c) 2006 - 2014, 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
Copyright (c) 2006 - 2014, 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
\r
MatchGuidIdx = MatchGuid - GuidTable;\r
\r
\r
MatchGuidIdx = MatchGuid - GuidTable;\r
\r
- for (Index = 0; Index < mPeiExMapppingTableSize; Index++) {\r
+ for (Index = 0; Index < mPcdDatabase.PeiDb->ExTokenCount; Index++) {\r
if ((ExTokenNumber == ExMap[Index].ExTokenNumber) &&\r
(MatchGuidIdx == ExMap[Index].ExGuidIndex)) {\r
return ExMap[Index].TokenNumber;\r
if ((ExTokenNumber == ExMap[Index].ExTokenNumber) &&\r
(MatchGuidIdx == ExMap[Index].ExGuidIndex)) {\r
return ExMap[Index].TokenNumber;\r
\r
MatchGuidIdx = MatchGuid - GuidTable;\r
\r
\r
MatchGuidIdx = MatchGuid - GuidTable;\r
\r
- for (Index = 0; Index < mDxeExMapppingTableSize; Index++) {\r
+ for (Index = 0; Index < mPcdDatabase.DxeDb->ExTokenCount; Index++) {\r
if ((ExTokenNumber == ExMap[Index].ExTokenNumber) &&\r
(MatchGuidIdx == ExMap[Index].ExGuidIndex)) {\r
return ExMap[Index].TokenNumber;\r
if ((ExTokenNumber == ExMap[Index].ExTokenNumber) &&\r
(MatchGuidIdx == ExMap[Index].ExGuidIndex)) {\r
return ExMap[Index].TokenNumber;\r