]> git.proxmox.com Git - mirror_edk2.git/blobdiff - EmbeddedPkg/Ebl/Main.c
EmbeddedPkg/Ebl: eliminate deprecated string function calls
[mirror_edk2.git] / EmbeddedPkg / Ebl / Main.c
index 18b2878f69a14d19c18094a2eb0ae33a99c65458..62f559fccfe8bbd8d2c775e13a19b943501d6a98 100644 (file)
@@ -88,7 +88,7 @@ SetCmdHistory (
     }\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
@@ -432,7 +432,7 @@ GetCmd (
       }\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
@@ -644,14 +644,14 @@ EdkBootLoaderEntry (
 \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