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
This commit is contained in:
lgao4 2011-12-15 06:56:57 +00:00
parent 2fc46f86f9
commit cb40609c75
2 changed files with 2 additions and 0 deletions

View File

@ -746,6 +746,7 @@ SetWorker (
//
GetPtrTypeSize (TokenNumber, &MaxSize);
if (*Size > MaxSize) {
*Size = MaxSize;
return EFI_INVALID_PARAMETER;
}
} else {

View File

@ -391,6 +391,7 @@ SetWorker (
//
GetPtrTypeSize (TokenNumber, &MaxSize, PeiPcdDb);
if (*Size > MaxSize) {
*Size = MaxSize;
return EFI_INVALID_PARAMETER;
}
} else {