summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg
diff options
context:
space:
mode:
authorydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524>2011-05-23 14:13:08 +0000
committerydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524>2011-05-23 14:13:08 +0000
commit33d41385e32425a25da13bdfbfb81f30f226ec18 (patch)
tree74c10f969b89486368ccf4e04fa9d818a18699a3 /MdeModulePkg
parent0e87144ee042186bf6a233d956c9979f1cd3e6a0 (diff)
downloadedk2-33d41385e32425a25da13bdfbfb81f30f226ec18.tar.gz
edk2-33d41385e32425a25da13bdfbfb81f30f226ec18.tar.bz2
edk2-33d41385e32425a25da13bdfbfb81f30f226ec18.zip
Fixed SCT test failed caused by driver sample.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@11693 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg')
-rw-r--r--MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c15
1 files changed, 10 insertions, 5 deletions
diff --git a/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c b/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c
index 618aa92dc9..83e669b9da 100644
--- a/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c
+++ b/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c
@@ -444,7 +444,10 @@ CreateAltCfgString (
EFI_STRING TmpStr;
UINTN NewLen;
- NewLen = (((1 + StrLen (ConfigHdr) + 8 + 4) + (8 + 4 + 7 + 4 + 7 + 4)) * 2 + StrLen (Result)) * sizeof (CHAR16);
+ //
+ // String Len = ConfigResp + AltConfig + AltConfig + 1("\0")
+ //
+ NewLen = (StrLen (Result) + ((1 + StrLen (ConfigHdr) + 8 + 4) + (8 + 4 + 7 + 4 + 7 + 4)) * 2 + 1) * sizeof (CHAR16);
StringPtr = AllocateZeroPool (NewLen);
if (StringPtr == NULL) {
return NULL;
@@ -599,8 +602,8 @@ AppendAltCfgString (
}
if (Offset <= ValueOffset && Offset + Width >= ValueOffset + ValueWidth) {
- *RequestResult = CreateAltCfgString(*RequestResult, ConfigRequestHdr, Offset, Width);
- return;
+ *RequestResult = CreateAltCfgString(*RequestResult, ConfigRequestHdr, ValueOffset, ValueWidth);
+ return;
}
}
}
@@ -829,8 +832,10 @@ ExtractConfig (
Results,
Progress
);
- ConfigRequestHdr = HiiConstructConfigHdr (&mFormSetGuid, VariableName, PrivateData->DriverHandle[0]);
- AppendAltCfgString(Results, ConfigRequestHdr);
+ if (!EFI_ERROR (Status)) {
+ ConfigRequestHdr = HiiConstructConfigHdr (&mFormSetGuid, VariableName, PrivateData->DriverHandle[0]);
+ AppendAltCfgString(Results, ConfigRequestHdr);
+ }
}
//