mirror of https://github.com/acidanthera/audk.git
add error handling for input parameter.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9583 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
81c5255cdf
commit
48a0e6bfbd
|
@ -1153,6 +1153,11 @@ EmuSetVariable (
|
|||
if (VariableName == NULL || VariableName[0] == 0 || VendorGuid == NULL) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
if (DataSize != 0 && Data == NULL) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
//
|
||||
// Make sure if runtime bit is set, boot service bit is set also
|
||||
//
|
||||
|
|
|
@ -1929,6 +1929,11 @@ RuntimeServiceSetVariable (
|
|||
if (VariableName == NULL || VariableName[0] == 0 || VendorGuid == NULL) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
if (DataSize != 0 && Data == NULL) {
|
||||
return EFI_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
//
|
||||
// Make sure if runtime bit is set, boot service bit is set also
|
||||
//
|
||||
|
|
Loading…
Reference in New Issue