mirror of https://github.com/acidanthera/audk.git
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:
parent
2fc46f86f9
commit
cb40609c75
|
@ -746,6 +746,7 @@ SetWorker (
|
|||
//
|
||||
GetPtrTypeSize (TokenNumber, &MaxSize);
|
||||
if (*Size > MaxSize) {
|
||||
*Size = MaxSize;
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
} else {
|
||||
|
|
|
@ -391,6 +391,7 @@ SetWorker (
|
|||
//
|
||||
GetPtrTypeSize (TokenNumber, &MaxSize, PeiPcdDb);
|
||||
if (*Size > MaxSize) {
|
||||
*Size = MaxSize;
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue