diff options
author | klu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-03-18 06:24:53 +0000 |
---|---|---|
committer | klu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-03-18 06:24:53 +0000 |
commit | 8ec8bed4394046cf1909b39cc42ef8829ddb28a3 (patch) | |
tree | ed28fb12b02947467ad755ab7f820d20b83c5b3f /MdeModulePkg/Universal/PCD/Dxe | |
parent | 2db63cd4faecff83eb0c12f0d888a7b9353f99d8 (diff) | |
download | edk2-platforms-8ec8bed4394046cf1909b39cc42ef8829ddb28a3.tar.xz |
1, For Pcd_PPI, UnregistedCallBack should return EFI_INVALID_PARAMETER if Callback function can not be found.
2, PCD_PPI/PROTOCOL should return EFI_INVALID_PARAMETER if size is unmatched
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10276 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/PCD/Dxe')
-rw-r--r-- | MdeModulePkg/Universal/PCD/Dxe/Service.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/MdeModulePkg/Universal/PCD/Dxe/Service.c b/MdeModulePkg/Universal/PCD/Dxe/Service.c index fc6f6b4414..5d4fbbc082 100644 --- a/MdeModulePkg/Universal/PCD/Dxe/Service.c +++ b/MdeModulePkg/Universal/PCD/Dxe/Service.c @@ -740,8 +740,14 @@ SetWorker ( //
ASSERT (TokenNumber + 1 < PCD_TOTAL_TOKEN_NUMBER + 1);
- if ((!PtrType) && (*Size != DxePcdGetSize (TokenNumber + 1))) {
- return EFI_INVALID_PARAMETER;
+ if (PtrType) {
+ if (*Size > DxePcdGetSize (TokenNumber + 1)) {
+ return EFI_INVALID_PARAMETER;
+ }
+ } else {
+ if (*Size != DxePcdGetSize (TokenNumber + 1)) {
+ return EFI_INVALID_PARAMETER;
+ }
}
//
|