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
This commit is contained in:
ydong10 2011-09-16 01:22:39 +00:00
parent 7929788a24
commit e4f95ca527
1 changed files with 7 additions and 1 deletions

View File

@ -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);