mirror of https://github.com/acidanthera/audk.git
NetworkPkg: Correct HttpConfigure parameter check
When HttpConfigData is NULL, HttpConfigure should not return EFI_INVALID_PARAMETER. Cc: Ye Ting <ting.ye@intel.com> Cc: Fu Siyuan <siyuan.fu@intel.com> Cc: Zhang Lubo <lubo.zhang@intel.com> Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Jiaxin Wu <jiaxin.wu@intel.com> Reviewed-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Zhang Lubo <lubo.zhang@intel.com>
This commit is contained in:
parent
6c2b77210f
commit
6be1193f14
|
@ -114,7 +114,6 @@ EfiHttpGetModeData (
|
||||||
@retval EFI_SUCCESS Operation succeeded.
|
@retval EFI_SUCCESS Operation succeeded.
|
||||||
@retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
|
@retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
|
||||||
This is NULL.
|
This is NULL.
|
||||||
HttpConfigData is NULL.
|
|
||||||
HttpConfigData->LocalAddressIsIPv6 is FALSE and
|
HttpConfigData->LocalAddressIsIPv6 is FALSE and
|
||||||
HttpConfigData->IPv4Node is NULL.
|
HttpConfigData->IPv4Node is NULL.
|
||||||
HttpConfigData->LocalAddressIsIPv6 is TRUE and
|
HttpConfigData->LocalAddressIsIPv6 is TRUE and
|
||||||
|
@ -141,9 +140,9 @@ EfiHttpConfigure (
|
||||||
// Check input parameters.
|
// Check input parameters.
|
||||||
//
|
//
|
||||||
if (This == NULL ||
|
if (This == NULL ||
|
||||||
HttpConfigData == NULL ||
|
(HttpConfigData != NULL &&
|
||||||
((HttpConfigData->LocalAddressIsIPv6 && HttpConfigData->AccessPoint.IPv6Node == NULL) ||
|
((HttpConfigData->LocalAddressIsIPv6 && HttpConfigData->AccessPoint.IPv6Node == NULL) ||
|
||||||
(!HttpConfigData->LocalAddressIsIPv6 && HttpConfigData->AccessPoint.IPv4Node == NULL))) {
|
(!HttpConfigData->LocalAddressIsIPv6 && HttpConfigData->AccessPoint.IPv4Node == NULL)))) {
|
||||||
return EFI_INVALID_PARAMETER;
|
return EFI_INVALID_PARAMETER;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -254,6 +253,7 @@ EfiHttpRequest (
|
||||||
//
|
//
|
||||||
Url = NULL;
|
Url = NULL;
|
||||||
UrlParser = NULL;
|
UrlParser = NULL;
|
||||||
|
RemotePort = 0;
|
||||||
HostName = NULL;
|
HostName = NULL;
|
||||||
RequestMsg = NULL;
|
RequestMsg = NULL;
|
||||||
HostNameStr = NULL;
|
HostNameStr = NULL;
|
||||||
|
@ -908,6 +908,7 @@ HttpResponseWorker (
|
||||||
SizeofHeaders = 0;
|
SizeofHeaders = 0;
|
||||||
BufferSize = 0;
|
BufferSize = 0;
|
||||||
EndofHeader = NULL;
|
EndofHeader = NULL;
|
||||||
|
ValueInItem = NULL;
|
||||||
|
|
||||||
if (HttpMsg->Data.Response != NULL) {
|
if (HttpMsg->Data.Response != NULL) {
|
||||||
//
|
//
|
||||||
|
|
|
@ -72,7 +72,6 @@ EfiHttpGetModeData (
|
||||||
@retval EFI_SUCCESS Operation succeeded.
|
@retval EFI_SUCCESS Operation succeeded.
|
||||||
@retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
|
@retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE:
|
||||||
This is NULL.
|
This is NULL.
|
||||||
HttpConfigData is NULL.
|
|
||||||
HttpConfigData->LocalAddressIsIPv6 is FALSE and
|
HttpConfigData->LocalAddressIsIPv6 is FALSE and
|
||||||
HttpConfigData->IPv4Node is NULL.
|
HttpConfigData->IPv4Node is NULL.
|
||||||
HttpConfigData->LocalAddressIsIPv6 is TRUE and
|
HttpConfigData->LocalAddressIsIPv6 is TRUE and
|
||||||
|
|
Loading…
Reference in New Issue