From fd431a9b3f927c51e5e9fdd9fe0b439024e58cfa Mon Sep 17 00:00:00 2001 From: gtian Date: Mon, 4 Feb 2008 19:51:45 +0000 Subject: [PATCH] Add the check- in missed file git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4674 6f19259b-4bc3-4df7-8a09-765794883524 --- IntelFrameworkModulePkg/Universal/VariablePei/Variable.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/IntelFrameworkModulePkg/Universal/VariablePei/Variable.c b/IntelFrameworkModulePkg/Universal/VariablePei/Variable.c index 72d8fd1252..8fc67499fb 100644 --- a/IntelFrameworkModulePkg/Universal/VariablePei/Variable.c +++ b/IntelFrameworkModulePkg/Universal/VariablePei/Variable.c @@ -614,6 +614,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) {