summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Universal/PlatformDriOverrideDxe
diff options
context:
space:
mode:
authorlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2009-05-20 12:05:45 +0000
committerlgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524>2009-05-20 12:05:45 +0000
commitae79d2f9ec344703f379a557b873efc9bf70cd1e (patch)
tree518517be0a885f65f48585668d4419748a1ac4ad /MdeModulePkg/Universal/PlatformDriOverrideDxe
parentf4efc39f3433222df6118484e735e7b9c2f487fc (diff)
downloadedk2-ae79d2f9ec344703f379a557b873efc9bf70cd1e.tar.gz
edk2-ae79d2f9ec344703f379a557b873efc9bf70cd1e.tar.bz2
edk2-ae79d2f9ec344703f379a557b873efc9bf70cd1e.zip
Update HiiDataBase to fix the SCT hang issues by the invalid device path.
Update the driver config access protocol extractconfig and routeconfig interface to check the input parameters. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@8349 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/PlatformDriOverrideDxe')
-rw-r--r--MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideDxe.c20
1 files changed, 15 insertions, 5 deletions
diff --git a/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideDxe.c b/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideDxe.c
index 085b8dd5cd..fa7ca9094c 100644
--- a/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideDxe.c
+++ b/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideDxe.c
@@ -1161,12 +1161,12 @@ PlatOverMngrExtractConfig (
EFI_STATUS Status;
EFI_CALLBACK_INFO *Private;
EFI_HII_CONFIG_ROUTING_PROTOCOL *HiiConfigRouting;
-
- if (Request == NULL) {
- return EFI_NOT_FOUND;
- }
- Private = EFI_CALLBACK_INFO_FROM_THIS (This);
+ if (Progress == NULL || Results == NULL || Request == NULL) {
+ return EFI_INVALID_PARAMETER;
+ }
+ *Progress = Request;
+ Private = EFI_CALLBACK_INFO_FROM_THIS (This);
HiiConfigRouting = Private->HiiConfigRouting;
//
@@ -1210,6 +1210,15 @@ PlatOverMngrRouteConfig (
UINT16 KeyValue;
PLAT_OVER_MNGR_DATA *FakeNvData;
+ if (Configuration == NULL || Progress == NULL) {
+ return EFI_INVALID_PARAMETER;
+ }
+ *Progress = Configuration;
+
+ if (!HiiIsConfigHdrMatch (Configuration, &mPlatformOverridesManagerGuid, mVariableName)) {
+ return EFI_NOT_FOUND;
+ }
+
Private = EFI_CALLBACK_INFO_FROM_THIS (This);
FakeNvData = &Private->FakeNvData;
if (!HiiGetBrowserData (&mPlatformOverridesManagerGuid, mVariableName, sizeof (PLAT_OVER_MNGR_DATA), (UINT8 *) FakeNvData)) {
@@ -1233,6 +1242,7 @@ PlatOverMngrRouteConfig (
CommintChanges (Private, KeyValue, FakeNvData);
}
+ *Progress = Configuration + StrLen (Configuration);
return EFI_SUCCESS;
}