From a72074803468da9503582876668d9a3abef42878 Mon Sep 17 00:00:00 2001 From: klu2 Date: Tue, 19 Dec 2006 02:52:11 +0000 Subject: [PATCH] Add more check for index whether exceed maximum value of fv count. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2115 6f19259b-4bc3-4df7-8a09-765794883524 --- EdkModulePkg/Library/EdkFvbServiceLib/x64/Fvb.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/EdkModulePkg/Library/EdkFvbServiceLib/x64/Fvb.c b/EdkModulePkg/Library/EdkFvbServiceLib/x64/Fvb.c index e9d7500261..4dcb81d216 100644 --- a/EdkModulePkg/Library/EdkFvbServiceLib/x64/Fvb.c +++ b/EdkModulePkg/Library/EdkFvbServiceLib/x64/Fvb.c @@ -102,7 +102,8 @@ Returns: // // Use the next free slot for a new entry // - UpdateIndex = mFvbCount++;; + UpdateIndex = mFvbCount++; + ASSERT (UpdateIndex < MAX_FVB_COUNT); mFvbEntry[UpdateIndex].Handle = Handle; } //