diff options
Diffstat (limited to 'ArmPlatformPkg/Bds')
-rw-r--r-- | ArmPlatformPkg/Bds/Bds.c | 2 | ||||
-rw-r--r-- | ArmPlatformPkg/Bds/BdsHelper.c | 4 | ||||
-rw-r--r-- | ArmPlatformPkg/Bds/BootOption.c | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/ArmPlatformPkg/Bds/Bds.c b/ArmPlatformPkg/Bds/Bds.c index 3a66eb3aa..ee79c4e8e 100644 --- a/ArmPlatformPkg/Bds/Bds.c +++ b/ArmPlatformPkg/Bds/Bds.c @@ -281,7 +281,7 @@ DefineDefaultBootEntries ( FdtLocalPath = NULL; FdtLocalSize = 0; } -
+ BootArguments = (ARM_BDS_LOADER_ARGUMENTS*)AllocatePool (sizeof(ARM_BDS_LOADER_ARGUMENTS) + CmdLineSize + InitrdSize + FdtLocalSize); if ( BootArguments != NULL ) { BootArguments->LinuxArguments.CmdLineSize = CmdLineSize; diff --git a/ArmPlatformPkg/Bds/BdsHelper.c b/ArmPlatformPkg/Bds/BdsHelper.c index a0dc74be4..fb12a8cec 100644 --- a/ArmPlatformPkg/Bds/BdsHelper.c +++ b/ArmPlatformPkg/Bds/BdsHelper.c @@ -35,7 +35,7 @@ EditHIInputStr ( Print (CmdLine);
// To prevent a buffer overflow, we only allow to enter (MaxCmdLine-1) characters
- for (CmdLineIndex = StrLen (CmdLine); CmdLineIndex < MaxCmdLine; ) {
+ for (CmdLineIndex = StrLen (CmdLine); CmdLineIndex < MaxCmdLine; ) { Status = gBS->WaitForEvent (1, &gST->ConIn->WaitForKey, &WaitIndex);
ASSERT_EFI_ERROR (Status);
@@ -62,7 +62,7 @@ EditHIInputStr ( }
} else if ((Key.ScanCode == SCAN_ESC) || (Char == 0x1B) || (Char == 0x0)) {
return EFI_INVALID_PARAMETER;
- } else if (CmdLineIndex < (MaxCmdLine-1)) {
+ } else if (CmdLineIndex < (MaxCmdLine-1)) { CmdLine[CmdLineIndex++] = Key.UnicodeChar;
Print (L"%c", Key.UnicodeChar);
}
diff --git a/ArmPlatformPkg/Bds/BootOption.c b/ArmPlatformPkg/Bds/BootOption.c index 7bbd548c8..edd193e3e 100644 --- a/ArmPlatformPkg/Bds/BootOption.c +++ b/ArmPlatformPkg/Bds/BootOption.c @@ -73,7 +73,7 @@ BootOptionStart ( if (LoaderType == BDS_LOADER_KERNEL_LINUX_LOCAL_FDT) { FdtLocalSize = ReadUnaligned16 ((CONST UINT16*)&LinuxArguments->FdtLocalSize); -
+ if (FdtLocalSize > 0) { FdtDevicePath = GetAlignedDevicePath ((EFI_DEVICE_PATH*)((UINTN)(LinuxArguments + 1) + CmdLineSize + InitrdSize)); } else { |