Skip to content

Commit

Permalink
[Cherry-Pick] [RB&FF] MdeModulePkg/HiiDatabaseDxe: Remove assert for …
Browse files Browse the repository at this point in the history
…VarStoreId = 0 (#1185)

## 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 <[email protected]>
Co-authored-by: Jeff Brasen <[email protected]>
  • Loading branch information
apop5 and jbrasen authored Oct 16, 2024
1 parent a45519a commit 27e1a98
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 @@ -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);
Expand Down

0 comments on commit 27e1a98

Please sign in to comment.