summaryrefslogtreecommitdiff
path: root/DuetPkg/FSVariable/FSVariable.c
diff options
context:
space:
mode:
Diffstat (limited to 'DuetPkg/FSVariable/FSVariable.c')
-rw-r--r--DuetPkg/FSVariable/FSVariable.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/DuetPkg/FSVariable/FSVariable.c b/DuetPkg/FSVariable/FSVariable.c
index 6bf61ab670..b68989c3a6 100644
--- a/DuetPkg/FSVariable/FSVariable.c
+++ b/DuetPkg/FSVariable/FSVariable.c
@@ -1288,6 +1288,10 @@ Returns:
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
//