From 27e1a9883c5a4b421afd42b302a2b314b3327598 Mon Sep 17 00:00:00 2001 From: Aaron Date: Wed, 16 Oct 2024 13:03:29 -0700 Subject: [PATCH] [Cherry-Pick] [RB&FF] MdeModulePkg/HiiDatabaseDxe: Remove assert for VarStoreId = 0 (#1185) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Description It is legal for the VarStoreId of a question to be 0 per the UEFI spec: "Specifies the identifier of a previously declared variable store to use when storing the question’s value. A value of zero indicates no associated variable store." Instead of hitting an assert just skip this question as there is no value to return. Signed-off-by: Jeff Brasen Co-authored-by: Jeff Brasen --- MdeModulePkg/Universal/HiiDatabaseDxe/ConfigKeywordHandler.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigKeywordHandler.c b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigKeywordHandler.c index 2e889bcabb..c5f7f954c0 100644 --- a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigKeywordHandler.c +++ b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigKeywordHandler.c @@ -2119,8 +2119,9 @@ ExtractConfigRequest ( // // Header->VarStoreId == 0 means no storage for this question. // - ASSERT (Header->VarStoreId != 0); - DEBUG ((DEBUG_INFO, "Varstore Id: 0x%x\n", Header->VarStoreId)); + if (Header->VarStoreId == 0) { + continue; + } Storage = FindStorageFromVarId (FormPackage, Header->VarStoreId); ASSERT (Storage != NULL);