/** @file\r
Framework PEIM to provide the Variable functionality\r
\r
-Copyright (c) 2006 - 2008 Intel Corporation. <BR>\r
+Copyright (c) 2006 - 2009 Intel Corporation. <BR>\r
All rights reserved. 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
Variable = IndexTable->StartPtr;\r
} else {\r
VariableBase = (UINT8 *) (UINTN) PcdGet32 (PcdFlashNvStorageVariableBase);\r
+\r
+ //\r
+ // Check if FV header is valid.\r
+ //\r
+ if (((EFI_FIRMWARE_VOLUME_HEADER *) VariableBase)->Signature != EFI_FVH_SIGNATURE) {\r
+ return EFI_UNSUPPORTED;\r
+ }\r
+\r
VariableStoreHeader = (VARIABLE_STORE_HEADER *) (VariableBase + \\r
((EFI_FIRMWARE_VOLUME_HEADER *) (VariableBase)) -> HeaderLength);\r
\r