diff options
Diffstat (limited to 'MdeModulePkg/Universal/Variable')
-rw-r--r-- | MdeModulePkg/Universal/Variable/Pei/Variable.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/MdeModulePkg/Universal/Variable/Pei/Variable.c b/MdeModulePkg/Universal/Variable/Pei/Variable.c index 92e690724d..52e19d1f73 100644 --- a/MdeModulePkg/Universal/Variable/Pei/Variable.c +++ b/MdeModulePkg/Universal/Variable/Pei/Variable.c @@ -603,6 +603,13 @@ Returns: //
VarDataSize = DataSizeOfVariable (Variable.CurrPtr);
if (*DataSize >= VarDataSize) {
+ //
+ // PO-TKW: Address one checking in this place
+ //
+ if (Data == NULL) {
+ return EFI_INVALID_PARAMETER;
+ }
+
(*PeiServices)->CopyMem (Data, GetVariableDataPtr (Variable.CurrPtr), VarDataSize);
if (Attributes != NULL) {
|