diff options
Diffstat (limited to 'MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c')
-rw-r--r-- | MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c b/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c index ee562d78c9..6bf1d6ec7c 100644 --- a/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c +++ b/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c @@ -574,7 +574,7 @@ AutoUpdateLangVariable( // Therefore, in variable driver, only store the original value for other use.
//
AsciiStrnCpy (mVariableModuleGlobal->LangCodes, Data, DataSize);
- } else if (StrCmp (VariableName, L"PlatformLang") == 0) {
+ } else if ((StrCmp (VariableName, L"PlatformLang") == 0) && (DataSize != 0)) {
ASSERT (AsciiStrLen (mVariableModuleGlobal->PlatformLangCodes) != 0);
//
@@ -604,7 +604,7 @@ AutoUpdateLangVariable( ASSERT_EFI_ERROR(Status);
- } else if (StrCmp (VariableName, L"Lang") == 0) {
+ } else if ((StrCmp (VariableName, L"Lang") == 0) && (DataSize != 0)) {
ASSERT (AsciiStrLen (mVariableModuleGlobal->LangCodes) != 0);
//
|