diff options
author | eric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-01-14 07:25:27 +0000 |
---|---|---|
committer | eric_tian <eric_tian@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-01-14 07:25:27 +0000 |
commit | a8a863a2b3382e78a16923b5f70b77217873ce64 (patch) | |
tree | 5cf1ac43ce207c1ba67f4a7f25fb6fbeb383f96d /DuetPkg | |
parent | e9867606178f943f5b5370f6d84a2f2fdb0bf25c (diff) | |
download | edk2-platforms-a8a863a2b3382e78a16923b5f70b77217873ce64.tar.xz |
add DataSize check to avoid PlatformLang/Lang variable is auto-mapped when try to delete these variables.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9748 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'DuetPkg')
-rw-r--r-- | DuetPkg/FSVariable/FSVariable.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/DuetPkg/FSVariable/FSVariable.c b/DuetPkg/FSVariable/FSVariable.c index b68989c3a6..30a21d1e6b 100644 --- a/DuetPkg/FSVariable/FSVariable.c +++ b/DuetPkg/FSVariable/FSVariable.c @@ -1,6 +1,6 @@ /*++
-Copyright (c) 2006 - 2009, Intel Corporation
+Copyright (c) 2006 - 2010, Intel Corporation
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
@@ -755,7 +755,7 @@ AutoUpdateLangVariable( // Therefore, in variable driver, only store the original value for other use.
//
AsciiStrnCpy (mGlobal->LangCodes, Data, DataSize);
- } else if (StrCmp (VariableName, L"PlatformLang") == 0) {
+ } else if ((StrCmp (VariableName, L"PlatformLang") == 0) && (DataSize != 0)) {
ASSERT (AsciiStrLen (mGlobal->PlatformLangCodes) != 0);
//
@@ -785,7 +785,7 @@ AutoUpdateLangVariable( ASSERT_EFI_ERROR(Status);
- } else if (StrCmp (VariableName, L"Lang") == 0) {
+ } else if ((StrCmp (VariableName, L"Lang") == 0) && (DataSize != 0)) {
ASSERT (AsciiStrLen (mGlobal->LangCodes) != 0);
//
|