diff options
-rw-r--r-- | NetworkPkg/DnsDxe/DnsDhcp.c | 2 | ||||
-rw-r--r-- | NetworkPkg/DnsDxe/DnsImpl.c | 4 | ||||
-rw-r--r-- | NetworkPkg/HttpDxe/HttpDriver.c | 2 | ||||
-rw-r--r-- | NetworkPkg/HttpDxe/HttpImpl.c | 4 |
4 files changed, 10 insertions, 2 deletions
diff --git a/NetworkPkg/DnsDxe/DnsDhcp.c b/NetworkPkg/DnsDxe/DnsDhcp.c index 4607f7b633..1cc337f0cf 100644 --- a/NetworkPkg/DnsDxe/DnsDhcp.c +++ b/NetworkPkg/DnsDxe/DnsDhcp.c @@ -301,6 +301,8 @@ GetDns4ServerFromDhcp4 ( Data = NULL;
InterfaceInfo = NULL;
+ ZeroMem ((UINT8 *) ParaList, sizeof (ParaList));
+
ZeroMem (&MnpConfigData, sizeof (EFI_MANAGED_NETWORK_CONFIG_DATA));
ZeroMem (&DnsServerInfor, sizeof (DNS4_SERVER_INFOR));
diff --git a/NetworkPkg/DnsDxe/DnsImpl.c b/NetworkPkg/DnsDxe/DnsImpl.c index c227093986..b196d181ca 100644 --- a/NetworkPkg/DnsDxe/DnsImpl.c +++ b/NetworkPkg/DnsDxe/DnsImpl.c @@ -1049,6 +1049,7 @@ IsValidDnsResponse ( continue;
} else {
TxString = NetbufGetByte (Packet, 0, NULL);
+ ASSERT (TxString != NULL);
DnsHeader = (DNS_HEADER *) TxString;
QueryName = (CHAR8 *) (TxString + sizeof (*DnsHeader));
QuerySection = (DNS_QUERY_SECTION *) (QueryName + AsciiStrLen (QueryName) + 1);
@@ -1426,7 +1427,8 @@ DnsOnPacketReceived ( ASSERT (Packet != NULL);
RcvString = NetbufGetByte (Packet, 0, NULL);
-
+ ASSERT (RcvString != NULL);
+
//
// Parse Dns Response
//
diff --git a/NetworkPkg/HttpDxe/HttpDriver.c b/NetworkPkg/HttpDxe/HttpDriver.c index b65607a4cb..43f42e29bf 100644 --- a/NetworkPkg/HttpDxe/HttpDriver.c +++ b/NetworkPkg/HttpDxe/HttpDriver.c @@ -79,7 +79,7 @@ HttpCleanService ( IN HTTP_SERVICE *HttpService
)
{
- if (HttpService != NULL) {
+ if (HttpService == NULL) {
return ;
}
diff --git a/NetworkPkg/HttpDxe/HttpImpl.c b/NetworkPkg/HttpDxe/HttpImpl.c index 4bd4ac884f..545fe42332 100644 --- a/NetworkPkg/HttpDxe/HttpImpl.c +++ b/NetworkPkg/HttpDxe/HttpImpl.c @@ -766,6 +766,10 @@ HttpResponseWorker ( HTTP_TOKEN_WRAP *ValueInItem;
UINTN HdrLen;
+ if (Wrap == NULL || Wrap->HttpInstance == NULL) {
+ return EFI_INVALID_PARAMETER;
+ }
+
HttpInstance = Wrap->HttpInstance;
Token = Wrap->HttpToken;
|