Current GetVariable implementation will return the first variable for
empty str VariableName, it is because GetVariable and GetNextVariablename
are sharing same function FindVariable.
But UEFI sepc defines SetVariable that If VariableName is an empty string,
then EFI_INVALID_PARAMETER is returned, that means an empty string variable
could never be set successfully, so GetVariable should return error for
empty string VariableName.

Cc: Jiewen Yao <jiewen....@intel.com>
Cc: Feng Tian <feng.t...@intel.com>
Cc: Ruiyu Ni <ruiyu...@intel.com>

Star Zeng (2):
  MdeModulePkg Variable: return error for empty str VariableName to
    GetVariable
  DuetPkg FSVariable: return error for empty str VariableName to
    GetVariable

 DuetPkg/FSVariable/FSVariable.c                             | 4 ++++
 MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c | 6 +++++-
 MdeModulePkg/Universal/Variable/Pei/Variable.c              | 6 +++++-
 MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c       | 4 ++++
 4 files changed, 18 insertions(+), 2 deletions(-)

-- 
2.7.0.windows.1

_______________________________________________
edk2-devel mailing list
edk2-devel@lists.01.org
https://lists.01.org/mailman/listinfo/edk2-devel

Reply via email to