From 0fb4402246ffeaee2481a1dcf11df41c758ca2d5 Mon Sep 17 00:00:00 2001 From: isakov-sl Date: Wed, 23 Jul 2014 07:34:59 +0000 Subject: 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 Reviewed-by: Eric Dong git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15673 6f19259b-4bc3-4df7-8a09-765794883524 --- IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'IntelFrameworkModulePkg') diff --git a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c index febfc054ee..a3b9dd8928 100644 --- a/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c +++ b/IntelFrameworkModulePkg/Universal/BdsDxe/BootMaint/UpdatePage.c @@ -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); -- cgit v1.2.3