diff options
Diffstat (limited to 'EdkModulePkg/Library/EdkFvbServiceLib/Ia32/Fvb.c')
-rw-r--r-- | EdkModulePkg/Library/EdkFvbServiceLib/Ia32/Fvb.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/EdkModulePkg/Library/EdkFvbServiceLib/Ia32/Fvb.c b/EdkModulePkg/Library/EdkFvbServiceLib/Ia32/Fvb.c index 222fb9bd4d..04693eb632 100644 --- a/EdkModulePkg/Library/EdkFvbServiceLib/Ia32/Fvb.c +++ b/EdkModulePkg/Library/EdkFvbServiceLib/Ia32/Fvb.c @@ -100,7 +100,11 @@ Returns: //
// Use the next free slot for a new entry
//
- UpdateIndex = mFvbCount++;;
+ UpdateIndex = mFvbCount++;
+ //
+ // Check the UpdateIndex whether exceed the maximum value.
+ //
+ ASSERT (UpdateIndex < MAX_FVB_COUNT);
mFvbEntry[UpdateIndex].Handle = Handle;
}
//
|