diff options
author | qwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-07-06 13:34:25 +0000 |
---|---|---|
committer | qwang12 <qwang12@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-07-06 13:34:25 +0000 |
commit | 2b21a9713ce974c14f26dfb5d3496372e04b501b (patch) | |
tree | b83008e7480ff94f7cea085778cac2a60c5f10cc /EdkModulePkg/Universal/PCD/Pei | |
parent | 3dd19b0d56310e40705bd6d38524ef488d94ed28 (diff) | |
download | edk2-platforms-2b21a9713ce974c14f26dfb5d3496372e04b501b.tar.xz |
Fixed a bug when input a invalid token number (not ZERO nor a valid token number) PcdLib should ASSERT.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@802 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EdkModulePkg/Universal/PCD/Pei')
-rw-r--r-- | EdkModulePkg/Universal/PCD/Pei/Pcd.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/EdkModulePkg/Universal/PCD/Pei/Pcd.c b/EdkModulePkg/Universal/PCD/Pei/Pcd.c index 6d90671852..4ae4b27ef4 100644 --- a/EdkModulePkg/Universal/PCD/Pei/Pcd.c +++ b/EdkModulePkg/Universal/PCD/Pei/Pcd.c @@ -480,6 +480,9 @@ PeiPcdGetNextToken ( BOOLEAN Found;
if (Guid == NULL) {
+ if (*TokenNumber > PEI_NEX_TOKEN_NUMBER) {
+ return EFI_NOT_FOUND;
+ }
(*TokenNumber)++;
if (*TokenNumber > PEI_NEX_TOKEN_NUMBER) {
*TokenNumber = PCD_INVALID_TOKEN_NUMBER;
|