Add code to check boot option variable before use it
Signed-off-by: Eric Dong <eric.dong@intel.com> Reviewed-by: Ni Ruiyu <ruiyu.ni@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13203 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
@ -126,4 +126,20 @@ BdsSetMemoryTypeInformationVariable (
|
||||
VOID
|
||||
);
|
||||
|
||||
/**
|
||||
Validate the EFI Boot#### or Driver#### variable (VendorGuid/Name)
|
||||
|
||||
@param Variable Boot#### variable data.
|
||||
@param VariableSize Returns the size of the EFI variable that was read
|
||||
|
||||
@retval TRUE The variable data is correct.
|
||||
@retval FALSE The variable data is corrupted.
|
||||
|
||||
**/
|
||||
BOOLEAN
|
||||
ValidateOption (
|
||||
UINT8 *Variable,
|
||||
UINTN VariableSize
|
||||
);
|
||||
|
||||
#endif // _BDS_LIB_H_
|
||||
|
Reference in New Issue
Block a user