From c60ea9a873b8fe0c4b9409b28d1608f7f80c9c22 Mon Sep 17 00:00:00 2001 From: oliviermartin Date: Tue, 28 Jun 2011 11:55:11 +0000 Subject: ArmPlatformPkg/Bds: Use unaligned read to access OptionalData in EFI_LOAD_OPTION EFI_LOAD_OPTION is a packed structure. Accessing to the non aligned double word requires to use ReadUnaligned32() function. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11916 6f19259b-4bc3-4df7-8a09-765794883524 --- ArmPlatformPkg/Bds/BootMenu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'ArmPlatformPkg/Bds/BootMenu.c') diff --git a/ArmPlatformPkg/Bds/BootMenu.c b/ArmPlatformPkg/Bds/BootMenu.c index 35c569d0b7..1e25c1e72e 100644 --- a/ArmPlatformPkg/Bds/BootMenu.c +++ b/ArmPlatformPkg/Bds/BootMenu.c @@ -436,7 +436,7 @@ BootMenuMain ( Print(L"\t- %s\n",DevicePathTxt); if (BootOption->OptionalData != NULL) { - Print(L"\t- LoaderType: %d\n",BootOption->OptionalData->LoaderType); + Print(L"\t- LoaderType: %d\n", ReadUnaligned32 (&BootOption->OptionalData->LoaderType)); if (BootOption->OptionalData->Arguments != NULL) { Print(L"\t- Arguments: %a\n",BootOption->OptionalData->Arguments); } -- cgit v1.2.3