summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/PCD/Pei/Service.c
diff options
context:
space:
mode:
Diffstat (limited to 'MdeModulePkg/Universal/PCD/Pei/Service.c')
-rw-r--r--MdeModulePkg/Universal/PCD/Pei/Service.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/MdeModulePkg/Universal/PCD/Pei/Service.c b/MdeModulePkg/Universal/PCD/Pei/Service.c
index a791ef725a..135d3dd397 100644
--- a/MdeModulePkg/Universal/PCD/Pei/Service.c
+++ b/MdeModulePkg/Universal/PCD/Pei/Service.c
@@ -2,7 +2,7 @@
The driver internal functions are implmented here.
They build Pei PCD database, and provide access service to PCD database.
-Copyright (c) 2006 - 2009, Intel Corporation
+Copyright (c) 2006 - 2010, Intel Corporation
All rights reserved. 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
@@ -344,6 +344,7 @@ SetValueWorker (
@retval EFI_INVALID_PARAMETER If this PCD type is VPD, VPD PCD can not be set.
@retval EFI_INVALID_PARAMETER If Size can not be set to size table.
+ @retval EFI_INVALID_PARAMETER If Size of non-Ptr type PCD does not match the size information in PCD database.
@retval EFI_NOT_FOUND If value type of PCD entry is intergrate, but not in
range of UINT8, UINT16, UINT32, UINT64
@retval EFI_NOT_FOUND Can not find the PCD type according to token number.
@@ -383,8 +384,8 @@ SetWorker (
LocalTokenNumber = PeiPcdDb->Init.LocalTokenNumberTable[TokenNumber];
- if (!PtrType) {
- ASSERT (PeiPcdGetSize(TokenNumber + 1) == *Size);
+ if ((!PtrType) && (PeiPcdGetSize(TokenNumber + 1) != *Size)) {
+ return EFI_INVALID_PARAMETER;
}
//