diff options
author | eric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-12-22 07:16:55 +0000 |
---|---|---|
committer | eric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-12-22 07:16:55 +0000 |
commit | 48a0e6bfbd736ecd28726308808f5a8e736c0657 (patch) | |
tree | de2529c7307d269c239a6748d2e551ec65cd86c4 /MdeModulePkg/Universal/Variable/EmuRuntimeDxe | |
parent | 81c5255cdfb07ebd5fea5ccc1c00f544e70f7977 (diff) | |
download | edk2-platforms-48a0e6bfbd736ecd28726308808f5a8e736c0657.tar.xz |
add error handling for input parameter.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9583 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/Variable/EmuRuntimeDxe')
-rw-r--r-- | MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c b/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c index fd0228d564..ee562d78c9 100644 --- a/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c +++ b/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c @@ -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
//
|