Fixed one possible array out of bounds issue.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by:  isakov-sl@bk.ru
Reviewed-by: Jeff Fan <jeff.fan@intel.com>
Reviewed-by: Eric Dong <eric.dong@intel.com>

git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15673 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
isakov-sl 2014-07-23 07:34:59 +00:00 committed by ydong10
parent 3facc089e5
commit 0fb4402246
1 changed files with 1 additions and 1 deletions

View File

@ -579,7 +579,7 @@ UpdateOrderPage (
ASSERT (OptionsOpCodeHandle != NULL);
NewMenuEntry = NULL;
for (OptionIndex = 0; (OptionOrder[OptionIndex] != 0 && OptionIndex < MAX_MENU_NUMBER); OptionIndex++) {
for (OptionIndex = 0; (OptionIndex < MAX_MENU_NUMBER && OptionOrder[OptionIndex] != 0); OptionIndex++) {
BootOptionFound = FALSE;
for (Index = 0; Index < OptionMenu->MenuNumber; Index++) {
NewMenuEntry = BOpt_GetMenuEntry (OptionMenu, Index);