diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c index 88f965059f..2b0f052060 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c +++ b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c @@ -1447,12 +1447,18 @@ GetQuestionValue ( // // Skip // - Value = Result + Length; if (IsBufferStorage) { + Value = StrStr (Result, L"&VALUE"); + if (Value == NULL) { + FreePool (Result); + return EFI_NOT_FOUND; + } // // Skip "&VALUE" // Value = Value + 6; + } else { + Value = Result + Length; } if (*Value != '=') { FreePool (Result);