summaryrefslogtreecommitdiff
path: root/ArmPkg/Application/LinuxLoader/LinuxLoader.c
diff options
context:
space:
mode:
Diffstat (limited to 'ArmPkg/Application/LinuxLoader/LinuxLoader.c')
-rw-r--r--ArmPkg/Application/LinuxLoader/LinuxLoader.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/ArmPkg/Application/LinuxLoader/LinuxLoader.c b/ArmPkg/Application/LinuxLoader/LinuxLoader.c
index 70b960b..76697c3 100644
--- a/ArmPkg/Application/LinuxLoader/LinuxLoader.c
+++ b/ArmPkg/Application/LinuxLoader/LinuxLoader.c
@@ -61,6 +61,7 @@ LinuxLoaderEntryPoint (
LIST_ENTRY *ResourceLink;
SYSTEM_MEMORY_RESOURCE *Resource;
EFI_PHYSICAL_ADDRESS SystemMemoryBase;
+ UINTN Length;
Status = gBS->LocateProtocol (
&gEfiDevicePathFromTextProtocolGuid,
@@ -182,12 +183,13 @@ LinuxLoaderEntryPoint (
}
if (LinuxCommandLine != NULL) {
- AsciiLinuxCommandLine = AllocatePool ((StrLen (LinuxCommandLine) + 1) * sizeof (CHAR8));
+ Length = StrLen (LinuxCommandLine) + 1;
+ AsciiLinuxCommandLine = AllocatePool (Length);
if (AsciiLinuxCommandLine == NULL) {
Status = EFI_OUT_OF_RESOURCES;
goto Error;
}
- UnicodeStrToAsciiStr (LinuxCommandLine, AsciiLinuxCommandLine);
+ UnicodeStrToAsciiStrS (LinuxCommandLine, AsciiLinuxCommandLine, Length);
}
//