//\r
UnicodeValueToString (ModeString, 0, Col, 0);\r
PStr = &ModeString[0];\r
- StrnCat (PStr, L" x ", StrLen(L" x ") + 1);\r
+ StrnCatS (PStr, sizeof (ModeString) / sizeof (ModeString[0]), L" x ", StrLen(L" x ") + 1);\r
PStr = PStr + StrLen (PStr);\r
UnicodeValueToString (PStr , 0, Row, 0);\r
\r
OptionsOpCodeHandle = HiiAllocateOpCodeHandle ();\r
ASSERT (OptionsOpCodeHandle != NULL);\r
\r
- for (Index = 0; Index < 4; Index++) {\r
+ for (Index = 0; Index < sizeof (TerminalType) / sizeof (TerminalType[0]); Index++) {\r
CheckFlags = 0;\r
if (NewTerminalContext->TerminalType == Index) {\r
CheckFlags |= EFI_IFR_OPTION_DEFAULT;\r