Add more check for index whether exceed maximum value of fv count.
authorklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 19 Dec 2006 02:52:11 +0000 (02:52 +0000)
committerklu2 <klu2@6f19259b-4bc3-4df7-8a09-765794883524>
Tue, 19 Dec 2006 02:52:11 +0000 (02:52 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2115 6f19259b-4bc3-4df7-8a09-765794883524

EdkModulePkg/Library/EdkFvbServiceLib/x64/Fvb.c

index e9d7500..4dcb81d 100644 (file)
@@ -102,7 +102,8 @@ Returns:
       //\r
       // Use the next free slot for a new entry\r
       //\r
-      UpdateIndex                   = mFvbCount++;;\r
+      UpdateIndex                   = mFvbCount++;\r
+                       ASSERT (UpdateIndex < MAX_FVB_COUNT);      \r
       mFvbEntry[UpdateIndex].Handle = Handle;\r
     }\r
     //\r