From fbe0805b2091393406952e84724188f8c1941837 Mon Sep 17 00:00:00 2001 From: Longhaox Lee Date: Fri, 14 Feb 2025 16:44:06 +0800 Subject: MdeModulePkg/HiiDatabaseDxe: Remove buffer error for string default. Remove efivarstore IFR buffer error when string load default. In the case of varstore type IFR, it will be NULL, just break into next opcode process. Resolve issue from commit cbe8a09dbac5c39d24ce5c4b9e7d44607f6c23da varstore type IFR string might return status error while execute ExtractConfig function. Signed-off-by: Longhao Lee --- MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c index b71b447f5f..c9aabaa3da 100644 --- a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c +++ b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c @@ -3016,6 +3016,10 @@ ParseIfrData ( goto Done; } + if (IfrEfiVarStoreTmp == NULL) { + break; + } + // // Set default value base on the DefaultId list get from IFR data. // @@ -3030,11 +3034,6 @@ ParseIfrData ( goto Done; } - if (IfrEfiVarStoreTmp == NULL) { - Status = EFI_OUT_OF_RESOURCES; - goto Done; - } - FindQuestionDefaultSetting (DefaultData.DefaultId, IfrEfiVarStoreTmp, &(IfrString->Question), (VOID *)StringData, VarWidth, QuestionReferBitField); if ((DefaultData.Value.string != 0) && (StringData != NULL)) { DefaultData.Value.string = InternalHiiSetString (HiiHandle, 0, StringData, NULL); -- cgit