summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c
diff options
context:
space:
mode:
authorydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524>2011-09-16 01:22:39 +0000
committerydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524>2011-09-16 01:22:39 +0000
commite4f95ca5278fd5c539d294e4545a9cd2f4473ba4 (patch)
treedbfbdf57768253fce97227c3deab5d91c929f78f /MdeModulePkg/Universal/SetupBrowserDxe/Setup.c
parent7929788a240a0fb52f452d2a222881b5daa74a9a (diff)
Refine the logic about getting Value info to avoid check data error.
Signed-off-by: ydong10 Reviewed-by: lgao4 git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@12360 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/SetupBrowserDxe/Setup.c')
-rw-r--r--MdeModulePkg/Universal/SetupBrowserDxe/Setup.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c
index 88f965059..2b0f05206 100644
--- a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c
+++ b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c
@@ -1447,12 +1447,18 @@ GetQuestionValue (
//
// Skip <ConfigRequest>
//
- 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);