mLinuxKernelCurrentAtag->header.type = ATAG_CMDLINE;\r
\r
/* place CommandLine into tag */\r
- AsciiStrCpy (mLinuxKernelCurrentAtag->body.cmdline_tag.cmdline, CmdLine);\r
+ AsciiStrCpyS (mLinuxKernelCurrentAtag->body.cmdline_tag.cmdline, LineLength, CmdLine);\r
\r
// move pointer to next tag\r
mLinuxKernelCurrentAtag = next_tag_address (mLinuxKernelCurrentAtag);\r
LIST_ENTRY *ResourceLink;\r
SYSTEM_MEMORY_RESOURCE *Resource;\r
EFI_PHYSICAL_ADDRESS SystemMemoryBase;\r
+ UINTN Length;\r
\r
Status = gBS->LocateProtocol (\r
&gEfiDevicePathFromTextProtocolGuid,\r
}\r
\r
if (LinuxCommandLine != NULL) {\r
- AsciiLinuxCommandLine = AllocatePool ((StrLen (LinuxCommandLine) + 1) * sizeof (CHAR8));\r
+ Length = StrLen (LinuxCommandLine) + 1;\r
+ AsciiLinuxCommandLine = AllocatePool (Length);\r
if (AsciiLinuxCommandLine == NULL) {\r
Status = EFI_OUT_OF_RESOURCES;\r
goto Error;\r
}\r
- UnicodeStrToAsciiStr (LinuxCommandLine, AsciiLinuxCommandLine);\r
+ UnicodeStrToAsciiStrS (LinuxCommandLine, AsciiLinuxCommandLine, Length);\r
}\r
\r
//\r