summaryrefslogtreecommitdiff
path: root/MdeModulePkg
diff options
context:
space:
mode:
Diffstat (limited to 'MdeModulePkg')
-rw-r--r--MdeModulePkg/Universal/HiiDatabaseDxe/ConfigKeywordHandler.c20
1 files changed, 18 insertions, 2 deletions
diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigKeywordHandler.c b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigKeywordHandler.c
index 4cf803c54f..eac7717053 100644
--- a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigKeywordHandler.c
+++ b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigKeywordHandler.c
@@ -2850,8 +2850,17 @@ EfiConfigKeywordHandlerSetData (
Status = ExtractNameSpace (StringPtr, &NameSpace, &NextStringPtr);
if (EFI_ERROR (Status)) {
*ProgressErr = KEYWORD_HANDLER_MALFORMED_STRING;
- return Status;
+ goto Done;
}
+ //
+ // 1.1 Check whether the input namespace is valid.
+ //
+ if (AsciiStrnCmp(NameSpace, UEFI_CONFIG_LANG, AsciiStrLen (UEFI_CONFIG_LANG)) != 0) {
+ *ProgressErr = KEYWORD_HANDLER_UNDEFINED_PROCESSING_ERROR;
+ Status = EFI_INVALID_PARAMETER;
+ goto Done;
+ }
+
StringPtr = NextStringPtr;
//
@@ -3124,7 +3133,14 @@ EfiConfigKeywordHandlerGetData (
*ProgressErr = KEYWORD_HANDLER_NAMESPACE_ID_NOT_FOUND;
return Status;
}
-
+ //
+ // 1.1 Check whether the input namespace is valid.
+ //
+ if (AsciiStrnCmp(NameSpace, UEFI_CONFIG_LANG, AsciiStrLen (UEFI_CONFIG_LANG)) != 0) {
+ *ProgressErr = KEYWORD_HANDLER_UNDEFINED_PROCESSING_ERROR;
+ return EFI_INVALID_PARAMETER;
+ }
+
if (KeywordString != NULL) {
//
// Use temp string to avoid changing input string buffer.