diff options
author | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-05-20 12:05:45 +0000 |
---|---|---|
committer | lgao4 <lgao4@6f19259b-4bc3-4df7-8a09-765794883524> | 2009-05-20 12:05:45 +0000 |
commit | ae79d2f9ec344703f379a557b873efc9bf70cd1e (patch) | |
tree | 518517be0a885f65f48585668d4419748a1ac4ad /MdeModulePkg/Universal/Network | |
parent | f4efc39f3433222df6118484e735e7b9c2f487fc (diff) | |
download | edk2-platforms-ae79d2f9ec344703f379a557b873efc9bf70cd1e.tar.xz |
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/Network')
-rw-r--r-- | MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.c | 17 | ||||
-rw-r--r-- | MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4ConfigNv.c | 15 |
2 files changed, 30 insertions, 2 deletions
diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.c b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.c index 8982a3b99f..59840f7f06 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.c +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.c @@ -359,9 +359,10 @@ IScsiFormExtractConfig ( ISCSI_FORM_CALLBACK_INFO *Private;
EFI_HII_CONFIG_ROUTING_PROTOCOL *HiiConfigRouting;
- if (Request == NULL) {
+ if (Request == NULL || Progress == NULL || Results == NULL) {
return EFI_INVALID_PARAMETER;
}
+ *Progress = Request;
if (!mIScsiDeviceListUpdated) {
//
@@ -444,6 +445,20 @@ IScsiFormRouteConfig ( OUT EFI_STRING *Progress
)
{
+ if (Configuration == NULL || Progress == NULL) {
+ return EFI_INVALID_PARAMETER;
+ }
+
+ //
+ // Check routing data in <ConfigHdr>.
+ // Note: if only one Storage is used, then this checking could be skipped.
+ //
+ if (!HiiIsConfigHdrMatch (Configuration, &mVendorGuid, mVendorStorageName)) {
+ *Progress = Configuration;
+ return EFI_NOT_FOUND;
+ }
+
+ *Progress = Configuration + StrLen (Configuration);
return EFI_SUCCESS;
}
diff --git a/MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4ConfigNv.c b/MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4ConfigNv.c index 3bcad8352c..b7de203881 100644 --- a/MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4ConfigNv.c +++ b/MdeModulePkg/Universal/Network/Ip4ConfigDxe/Ip4ConfigNv.c @@ -554,6 +554,9 @@ Ip4FormExtractConfig ( OUT EFI_STRING *Results
)
{
+ if (Request == NULL || Progress == NULL || Results == NULL) {
+ return EFI_INVALID_PARAMETER;
+ }
*Progress = Request;
return EFI_NOT_FOUND;
}
@@ -599,7 +602,17 @@ Ip4FormRouteConfig ( OUT EFI_STRING *Progress
)
{
- return EFI_NOT_FOUND;
+ if (Configuration == NULL || Progress == NULL) {
+ return EFI_INVALID_PARAMETER;
+ }
+
+ *Progress = Configuration;
+ if (!HiiIsConfigHdrMatch (Configuration, &gEfiNicIp4ConfigVariableGuid, EFI_NIC_IP4_CONFIG_VARIABLE)) {
+ return EFI_NOT_FOUND;
+ }
+
+ *Progress = Configuration + StrLen (Configuration);
+ return EFI_SUCCESS;
}
/**
|