summaryrefslogtreecommitdiff
path: root/MdeModulePkg
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
parent7929788a240a0fb52f452d2a222881b5daa74a9a (diff)
downloadedk2-platforms-e4f95ca5278fd5c539d294e4545a9cd2f4473ba4.tar.xz
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')
-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 88f965059f..2b0f052060 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);