From: klu2 Date: Tue, 19 Dec 2006 02:44:36 +0000 (+0000) Subject: Add more check for index whether exceed maximum value of fv count. X-Git-Tag: edk2-stable201903~23763 X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=commitdiff_plain;h=95ed6470d1e3acdb355316138935e43052f72274 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 --- 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; } //