mirror of https://github.com/acidanthera/audk.git
[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
This commit is contained in:
parent
e84217e7cf
commit
01f352a7ca
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue