X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=EmbeddedPkg%2FEbl%2FMain.c;h=62f559fccfe8bbd8d2c775e13a19b943501d6a98;hb=d780544d3d1c67e2663e146e97c29bb2dc308172;hp=18b2878f69a14d19c18094a2eb0ae33a99c65458;hpb=50c6a4d2d4d7ede07143c0cde9505938e5d43a5b;p=mirror_edk2.git diff --git a/EmbeddedPkg/Ebl/Main.c b/EmbeddedPkg/Ebl/Main.c index 18b2878f69..62f559fccf 100644 --- a/EmbeddedPkg/Ebl/Main.c +++ b/EmbeddedPkg/Ebl/Main.c @@ -88,7 +88,7 @@ SetCmdHistory ( } // Copy the new command line into the ring buffer - AsciiStrnCpy(&mCmdHistory[mCmdHistoryStart][0], Cmd, MAX_CMD_LINE); + AsciiStrnCpyS (&mCmdHistory[mCmdHistoryStart][0], MAX_CMD_LINE, Cmd, MAX_CMD_LINE); } // Reset the command history for the next up arrow press @@ -432,7 +432,7 @@ GetCmd ( } AsciiPrint (History); Index = AsciiStrLen (History); - AsciiStrnCpy (Cmd, History, CmdMaxSize); + AsciiStrnCpyS (Cmd, CmdMaxSize, History, CmdMaxSize); } else { Cmd[Index++] = Char; if (FixedPcdGetBool(PcdEmbeddedShellCharacterEcho) == TRUE) { @@ -644,14 +644,14 @@ EdkBootLoaderEntry ( Status = gRT->GetVariable(CommandLineVariableName, &VendorGuid, NULL, &CommandLineVariableSize, CommandLineVariable); if (!EFI_ERROR(Status)) { - UnicodeStrToAsciiStr(CommandLineVariable, CmdLine); + UnicodeStrToAsciiStrS (CommandLineVariable, CmdLine, MAX_CMD_LINE); } FreePool(CommandLineVariable); } if (EFI_ERROR(Status)) { - AsciiStrCpy (CmdLine, (CHAR8 *)PcdGetPtr (PcdEmbeddedAutomaticBootCommand)); + AsciiStrCpyS (CmdLine, MAX_CMD_LINE, (CHAR8 *)PcdGetPtr (PcdEmbeddedAutomaticBootCommand)); } for (;;) {