X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdeModulePkg%2FApplication%2FUiApp%2FBootMaint%2FUpdatePage.c;h=9f1d20d8ed6a226f6bb2dc13e0106e38654ac520;hp=d85f2eaef92f67bf1e41dd57e3b4a36fe389ab9a;hb=4cac5c0526f15f01e97f1ca1c703307fd459d4c1;hpb=afc244a59d76be23471719d1cffd27785c59a3e8 diff --git a/MdeModulePkg/Application/UiApp/BootMaint/UpdatePage.c b/MdeModulePkg/Application/UiApp/BootMaint/UpdatePage.c index d85f2eaef9..9f1d20d8ed 100644 --- a/MdeModulePkg/Application/UiApp/BootMaint/UpdatePage.c +++ b/MdeModulePkg/Application/UiApp/BootMaint/UpdatePage.c @@ -838,7 +838,7 @@ UpdateConModePage ( // UnicodeValueToString (ModeString, 0, Col, 0); PStr = &ModeString[0]; - StrnCat (PStr, L" x ", StrLen(L" x ") + 1); + StrnCatS (PStr, sizeof (ModeString) / sizeof (ModeString[0]), L" x ", StrLen(L" x ") + 1); PStr = PStr + StrLen (PStr); UnicodeValueToString (PStr , 0, Row, 0); @@ -1056,7 +1056,7 @@ UpdateTerminalPage ( OptionsOpCodeHandle = HiiAllocateOpCodeHandle (); ASSERT (OptionsOpCodeHandle != NULL); - for (Index = 0; Index < 4; Index++) { + for (Index = 0; Index < sizeof (TerminalType) / sizeof (TerminalType[0]); Index++) { CheckFlags = 0; if (NewTerminalContext->TerminalType == Index) { CheckFlags |= EFI_IFR_OPTION_DEFAULT;