/*++\r
\r
-Copyright (c) 2006 - 2009, Intel Corporation\r
+Copyright (c) 2006 - 2010, Intel Corporation\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
// Therefore, in variable driver, only store the original value for other use.\r
//\r
AsciiStrnCpy (mGlobal->LangCodes, Data, DataSize);\r
- } else if (StrCmp (VariableName, L"PlatformLang") == 0) {\r
+ } else if ((StrCmp (VariableName, L"PlatformLang") == 0) && (DataSize != 0)) {\r
ASSERT (AsciiStrLen (mGlobal->PlatformLangCodes) != 0);\r
\r
//\r
\r
ASSERT_EFI_ERROR(Status);\r
\r
- } else if (StrCmp (VariableName, L"Lang") == 0) {\r
+ } else if ((StrCmp (VariableName, L"Lang") == 0) && (DataSize != 0)) {\r
ASSERT (AsciiStrLen (mGlobal->LangCodes) != 0);\r
\r
//\r