}\r
\r
// Copy the new command line into the ring buffer\r
- AsciiStrnCpy(&mCmdHistory[mCmdHistoryStart][0], Cmd, MAX_CMD_LINE);\r
+ AsciiStrnCpyS (&mCmdHistory[mCmdHistoryStart][0], MAX_CMD_LINE, Cmd, MAX_CMD_LINE);\r
}\r
\r
// Reset the command history for the next up arrow press\r
}\r
AsciiPrint (History);\r
Index = AsciiStrLen (History);\r
- AsciiStrnCpy (Cmd, History, CmdMaxSize);\r
+ AsciiStrnCpyS (Cmd, CmdMaxSize, History, CmdMaxSize);\r
} else {\r
Cmd[Index++] = Char;\r
if (FixedPcdGetBool(PcdEmbeddedShellCharacterEcho) == TRUE) {\r
\r
Status = gRT->GetVariable(CommandLineVariableName, &VendorGuid, NULL, &CommandLineVariableSize, CommandLineVariable);\r
if (!EFI_ERROR(Status)) {\r
- UnicodeStrToAsciiStr(CommandLineVariable, CmdLine);\r
+ UnicodeStrToAsciiStrS (CommandLineVariable, CmdLine, MAX_CMD_LINE);\r
}\r
\r
FreePool(CommandLineVariable);\r
}\r
\r
if (EFI_ERROR(Status)) {\r
- AsciiStrCpy (CmdLine, (CHAR8 *)PcdGetPtr (PcdEmbeddedAutomaticBootCommand));\r
+ AsciiStrCpyS (CmdLine, MAX_CMD_LINE, (CHAR8 *)PcdGetPtr (PcdEmbeddedAutomaticBootCommand));\r
}\r
\r
for (;;) {\r