MdeModulePkg/NetworkPkg: Checking for NULL pointer before use.

Contributed-under: TianoCore Contribution Agreement 1.1

Signed-off-by: Sivaraman Nainar <sivaramann@amiindia.co.in>
Reviewed-by: Fu Siyuan <siyuan.fu@intel.com>
This commit is contained in:
Fu Siyuan 2018-06-14 10:30:09 +08:00
parent 855abe0204
commit 1e0db7b119
3 changed files with 9 additions and 3 deletions

View File

@ -1048,7 +1048,10 @@ Ip4Groups (
// is decreamented each time an address is removed..
//
for (Index = IpInstance->GroupCount; Index > 0 ; Index--) {
Group = 0;
if(IpInstance->Groups != NULL) {
Group = IpInstance->Groups[Index - 1];
}
if ((GroupAddress == NULL) || EFI_IP4_EQUAL (&Group, GroupAddress)) {
if (EFI_ERROR (Ip4LeaveGroup (IpInstance, NTOHL (Group)))) {

View File

@ -473,6 +473,9 @@ HttpBootFormCallback (
// Get user input URI string
//
Uri = HiiGetString (CallbackInfo->RegisteredHandle, Value->string, NULL);
if(Uri == NULL) {
return EFI_INVALID_PARAMETER;
}
//
// The URI should be either an empty string (for corporate environment) ,or http(s) for home environment.

View File

@ -2438,7 +2438,7 @@ Ikev2ChildSaParseSaPayload (
IntegrityAlgorithm = 0;
EncryptAlgorithm = 0;
EncryptKeylength = 0;
IsMatch = TRUE;
IsMatch = FALSE;
IsSupportEsn = FALSE;
PreferIsSupportEsn = FALSE;