]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Variable/Pei/Variable.c
MdeModulePkg Variable: return error for empty str VariableName to GetVariable
[mirror_edk2.git] / MdeModulePkg / Universal / Variable / Pei / Variable.c
index c68a41ddfe7dcb57b8479d54241774c8ad49af6d..a072c31e60e74c89683503e5716cf6dd32f40ea2 100644 (file)
@@ -2,7 +2,7 @@
   Implement ReadOnly Variable Services required by PEIM and install\r
   PEI ReadOnly Varaiable2 PPI. These services operates the non volatile storage space.\r
 \r
-Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -978,6 +978,10 @@ PeiGetVariable (
     return EFI_INVALID_PARAMETER;\r
   }\r
 \r
+  if (VariableName[0] == 0) {\r
+    return EFI_NOT_FOUND;\r
+  }\r
+\r
   VariableHeader = NULL;\r
 \r
   //\r