//\r
VarDataSize = Variable.CurrPtr->DataSize;\r
if (*DataSize >= VarDataSize) {\r
+ if (Data == NULL) {\r
+ return EFI_INVALID_PARAMETER;\r
+ }\r
+\r
CopyMem (Data, GetVariableDataPtr (Variable.CurrPtr), VarDataSize);\r
- if (Attributes) {\r
+ if (Attributes != NULL) {\r
*Attributes = Variable.CurrPtr->Attributes;\r
}\r
\r
UINTN VarNameSize;\r
EFI_STATUS Status;\r
\r
- if (VariableNameSize == NULL || VendorGuid == NULL) {\r
+ if (VariableNameSize == NULL || VariableName == NULL || VendorGuid == NULL) {\r
return EFI_INVALID_PARAMETER;\r
}\r
\r