Revision: 16448
http://sourceforge.net/p/edk2/code/16448
Author: lzeng14
Date: 2014-11-26 07:17:31 +0000 (Wed, 26 Nov 2014)
Log Message:
-----------
Fix an issue in the PCD service to prevent potential out of bound array access
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 <[email protected]>
Reviewed-by: Star Zeng <[email protected]>
Modified Paths:
--------------
trunk/edk2/MdeModulePkg/Universal/PCD/Dxe/Service.c
Modified: trunk/edk2/MdeModulePkg/Universal/PCD/Dxe/Service.c
===================================================================
--- trunk/edk2/MdeModulePkg/Universal/PCD/Dxe/Service.c 2014-11-26 02:44:06 UTC
(rev 16447)
+++ trunk/edk2/MdeModulePkg/Universal/PCD/Dxe/Service.c 2014-11-26 07:17:31 UTC
(rev 16448)
@@ -1,6 +1,7 @@
/** @file
Help functions used by PCD DXE driver.
+Copyright (c) 2014, Hewlett-Packard Development Company, L.P.<BR>
Copyright (c) 2006 - 2014, 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
@@ -1508,7 +1509,7 @@
MatchGuidIdx = MatchGuid - GuidTable;
- for (Index = 0; Index < mPeiExMapppingTableSize; Index++) {
+ for (Index = 0; Index < mPcdDatabase.PeiDb->ExTokenCount; Index++) {
if ((ExTokenNumber == ExMap[Index].ExTokenNumber) &&
(MatchGuidIdx == ExMap[Index].ExGuidIndex)) {
return ExMap[Index].TokenNumber;
@@ -1529,7 +1530,7 @@
MatchGuidIdx = MatchGuid - GuidTable;
- for (Index = 0; Index < mDxeExMapppingTableSize; Index++) {
+ for (Index = 0; Index < mPcdDatabase.DxeDb->ExTokenCount; Index++) {
if ((ExTokenNumber == ExMap[Index].ExTokenNumber) &&
(MatchGuidIdx == ExMap[Index].ExGuidIndex)) {
return ExMap[Index].TokenNumber;
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=157005751&iu=/4140/ostg.clktrk
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits