summaryrefslogtreecommitdiff
path: root/MdeModulePkg
diff options
context:
space:
mode:
authorqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2009-05-04 05:55:56 +0000
committerqhuang8 <qhuang8@6f19259b-4bc3-4df7-8a09-765794883524>2009-05-04 05:55:56 +0000
commita1373617d6bba05ab96b5e0c272fbe1f24aee237 (patch)
tree3d8adf9749a4b5042be090c3ca11a4b80327a098 /MdeModulePkg
parent8243b089aba90212f295d0454dc2592c256eda20 (diff)
downloadedk2-platforms-a1373617d6bba05ab96b5e0c272fbe1f24aee237.tar.xz
Fix a bug that L"PlatformLang" must be a null-terminated ASCII string according to UEFI spec.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8232 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg')
-rw-r--r--MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c2
-rw-r--r--MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c b/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c
index d017f802e3..cbf953dfe9 100644
--- a/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c
+++ b/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c
@@ -571,7 +571,7 @@ AutoUpdateLangVariable(
FindVariable(L"PlatformLang", &gEfiGlobalVariableGuid, &Variable, (VARIABLE_GLOBAL *)mVariableModuleGlobal);
Status = UpdateVariable(L"PlatformLang", &gEfiGlobalVariableGuid,
- BestPlatformLang, AsciiStrLen (BestPlatformLang), Attributes, &Variable);
+ BestPlatformLang, AsciiStrSize (BestPlatformLang), Attributes, &Variable);
DEBUG((EFI_D_INFO, "Variable Driver Auto Update Lang, Lang:%a, PlatformLang:%a\n", BestLang, BestPlatformLang));
ASSERT_EFI_ERROR(Status);
diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
index a1c99677f9..02f146895f 100644
--- a/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
+++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/Variable.c
@@ -1308,7 +1308,7 @@ AutoUpdateLangVariable(
FindVariable(L"PlatformLang", &gEfiGlobalVariableGuid, &Variable, (VARIABLE_GLOBAL *)mVariableModuleGlobal);
Status = UpdateVariable(L"PlatformLang", &gEfiGlobalVariableGuid,
- BestPlatformLang, AsciiStrLen (BestPlatformLang), Attributes, &Variable);
+ BestPlatformLang, AsciiStrSize (BestPlatformLang), Attributes, &Variable);
DEBUG((EFI_D_INFO, "Variable Driver Auto Update Lang, Lang:%a, PlatformLang:%a\n", BestLang, BestPlatformLang));
ASSERT_EFI_ERROR(Status);