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:
ydong10
2012-04-19 09:57:11 +00:00
parent a7450323c2
commit 8c08a567c6
3 changed files with 136 additions and 18 deletions

View File

@ -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_