Skip to content

Commit

Permalink
MdeModulePkg/HiiDatabaseDxe: Remove assert for VarStoreId = 0
Browse files Browse the repository at this point in the history
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 <jbrasen@nvidia.com>
  • Loading branch information
jbrasen authored and mergify[bot] committed Jun 6, 2024
1 parent b45aff0 commit 65b0d08
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions MdeModulePkg/Universal/HiiDatabaseDxe/ConfigKeywordHandler.c
Original file line number Diff line number Diff line change
Expand Up @@ -2101,8 +2101,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);
Expand Down

0 comments on commit 65b0d08

Please sign in to comment.