summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/Variable/Pei/Variable.c
diff options
context:
space:
mode:
authoreric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>2008-03-18 06:46:10 +0000
committereric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524>2008-03-18 06:46:10 +0000
commit01f352a7ca57e2bc5ed0f72e5b1d50b6de4469ed (patch)
tree7e79bc5a9ae1164251c316e72f0c22dcee0d3609 /MdeModulePkg/Universal/Variable/Pei/Variable.c
parente84217e7cfe0b1b160d4b870045f7df7b888c4a5 (diff)
downloadedk2-platforms-01f352a7ca57e2bc5ed0f72e5b1d50b6de4469ed.tar.xz
[Description]
PeiGetVariable() and PeiGetNextVariableName() do not check NULL pointer access, not follow spec [Impaction] modify the Variable.c file in MdeModulePkg/Universal/Variable/Pei [Reference Info] PeiGetVariable() and PeiGetVariableName() do not follow spec git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@4899 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/Variable/Pei/Variable.c')
-rw-r--r--MdeModulePkg/Universal/Variable/Pei/Variable.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/MdeModulePkg/Universal/Variable/Pei/Variable.c b/MdeModulePkg/Universal/Variable/Pei/Variable.c
index 52e19d1f73..24e051cf1f 100644
--- a/MdeModulePkg/Universal/Variable/Pei/Variable.c
+++ b/MdeModulePkg/Universal/Variable/Pei/Variable.c
@@ -1,6 +1,6 @@
/*++
-Copyright (c) 2006 - 2007 Intel Corporation. <BR>
+Copyright (c) 2006 - 2008 Intel Corporation. <BR>
All rights reserved. This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -588,7 +588,7 @@ Returns:
EFI_PEI_SERVICES **PeiServices;
PeiServices = GetPeiServicesTablePointer ();
- if (VariableName == NULL || VariableGuid == NULL) {
+ if (VariableName == NULL || VariableGuid == NULL || DataSize == NULL) {
return EFI_INVALID_PARAMETER;
}
//
@@ -665,7 +665,7 @@ Returns:
EFI_PEI_SERVICES **PeiServices;
PeiServices = GetPeiServicesTablePointer ();
- if (VariableName == NULL) {
+ if (VariableName == NULL || VariableGuid == NULL || VariableNameSize == NULL) {
return EFI_INVALID_PARAMETER;
}