Revision: 16461
http://sourceforge.net/p/edk2/code/16461
Author: vanjeff
Date: 2014-12-01 08:54:20 +0000 (Mon, 01 Dec 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.
(Sync patch r16448 from main trunk.)
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Samer El-Haj-Mahmoud <[email protected]>
Reviewed-by: Star Zeng <[email protected]>
Revision Links:
--------------
http://sourceforge.net/p/edk2/code/16448
Modified Paths:
--------------
branches/UDK2014.SP1/MdeModulePkg/Universal/PCD/Dxe/Service.c
Modified: branches/UDK2014.SP1/MdeModulePkg/Universal/PCD/Dxe/Service.c
===================================================================
--- branches/UDK2014.SP1/MdeModulePkg/Universal/PCD/Dxe/Service.c
2014-12-01 08:51:50 UTC (rev 16460)
+++ branches/UDK2014.SP1/MdeModulePkg/Universal/PCD/Dxe/Service.c
2014-12-01 08:54:20 UTC (rev 16461)
@@ -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