From 5aecd343253d06393f3e56be0fd3fe8aa95eef99 Mon Sep 17 00:00:00 2001 From: Olivier Martin Date: Tue, 22 Apr 2014 10:13:38 +0000 Subject: ArmPlatformPkg/Bds: Do not print garbage if the command line argument is empty Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15478 6f19259b-4bc3-4df7-8a09-765794883524 --- ArmPlatformPkg/Bds/BootMenu.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'ArmPlatformPkg') diff --git a/ArmPlatformPkg/Bds/BootMenu.c b/ArmPlatformPkg/Bds/BootMenu.c index 1c923e902e..e10f574103 100644 --- a/ArmPlatformPkg/Bds/BootMenu.c +++ b/ArmPlatformPkg/Bds/BootMenu.c @@ -782,7 +782,9 @@ BootMenuMain ( GetAlignedDevicePath ((EFI_DEVICE_PATH*)((UINTN)(&OptionalData->Arguments.LinuxArguments + 1) + CmdLineSize)), TRUE, TRUE); Print(L"\t- Initrd: %s\n", DevicePathTxt); } - Print(L"\t- Arguments: %a\n", (&OptionalData->Arguments.LinuxArguments + 1)); + if (ReadUnaligned16 (&OptionalData->Arguments.LinuxArguments.CmdLineSize) > 0) { + Print(L"\t- Arguments: %a\n", (&OptionalData->Arguments.LinuxArguments + 1)); + } } switch (LoaderType) { -- cgit v1.2.3