diff options
author | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-12-15 06:56:57 +0000 |
---|---|---|
committer | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2011-12-15 06:56:57 +0000 |
commit | cb40609c754e8ddd351b8f01a60f8097ed0b82dc (patch) | |
tree | 67dc99f4e5b299ead8e6cd70b371feb73bbc8b59 /MdeModulePkg/Universal/PCD/Pei | |
parent | 2fc46f86f91daf139ffb1bf20500d8254f037d2b (diff) | |
download | edk2-platforms-cb40609c754e8ddd351b8f01a60f8097ed0b82dc.tar.xz |
Update PcdSetPtr() API to set the output buffer size to the max buffer size when the input buffer size is larger than the max buffer size. This behavior follows API description.
Signed-off-by: lgao4
Reviewed-by: jlin16
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12875 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/PCD/Pei')
-rw-r--r-- | MdeModulePkg/Universal/PCD/Pei/Service.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/MdeModulePkg/Universal/PCD/Pei/Service.c b/MdeModulePkg/Universal/PCD/Pei/Service.c index 4e7366e759..4769600da7 100644 --- a/MdeModulePkg/Universal/PCD/Pei/Service.c +++ b/MdeModulePkg/Universal/PCD/Pei/Service.c @@ -391,6 +391,7 @@ SetWorker ( //
GetPtrTypeSize (TokenNumber, &MaxSize, PeiPcdDb);
if (*Size > MaxSize) {
+ *Size = MaxSize;
return EFI_INVALID_PARAMETER;
}
} else {
|