mirror of https://github.com/acidanthera/audk.git
ArmPlatformPkg/Bds: Check OptionalData is not NULL before accessing it
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Olivier Martin <olivier.martin@arm.com> git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15439 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
1dbbfc176f
commit
734b6c33ba
|
@ -39,7 +39,10 @@
|
|||
|
||||
#define ARM_BDS_OPTIONAL_DATA_SIGNATURE SIGNATURE_32('a', 'b', 'o', 'd')
|
||||
|
||||
#define IS_ARM_BDS_BOOTENTRY(ptr) (ReadUnaligned32 ((CONST UINT32*)&((ARM_BDS_LOADER_OPTIONAL_DATA*)((ptr)->OptionalData))->Header.Signature) == ARM_BDS_OPTIONAL_DATA_SIGNATURE)
|
||||
#define IS_ARM_BDS_BOOTENTRY(ptr) \
|
||||
(((ptr)->OptionalData != NULL) && \
|
||||
(ReadUnaligned32 ((CONST UINT32*)&((ARM_BDS_LOADER_OPTIONAL_DATA*)((ptr)->OptionalData))->Header.Signature) \
|
||||
== ARM_BDS_OPTIONAL_DATA_SIGNATURE))
|
||||
|
||||
#define UPDATE_BOOT_ENTRY L"Update entry: "
|
||||
#define DELETE_BOOT_ENTRY L"Delete entry: "
|
||||
|
|
Loading…
Reference in New Issue