diff options
author | klu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-12-19 02:44:36 +0000 |
---|---|---|
committer | klu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524> | 2006-12-19 02:44:36 +0000 |
commit | 95ed6470d1e3acdb355316138935e43052f72274 (patch) | |
tree | 5f9ddd9a9318753bac2d51346f160576bfd1e15d | |
parent | 34da4fdb4d22d06c899bdff199a5c41322818c5c (diff) | |
download | edk2-95ed6470d1e3acdb355316138935e43052f72274.zip edk2-95ed6470d1e3acdb355316138935e43052f72274.tar.gz edk2-95ed6470d1e3acdb355316138935e43052f72274.tar.bz2 |
Add more check for index whether exceed maximum value of fv count.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2114 6f19259b-4bc3-4df7-8a09-765794883524
-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 222fb9b..04693eb 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;
}
//
|