NetworkPkg: Avoid potential NULL pointer dereference
The commit of 6b16c9e7
removes ASSERT and use error handling
in IpSecDxe driver, but may cause the potential NULL pointer
dereference. So, this patch is used to avoid NULL pointer
dereference.
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: Ye Ting <ting.ye@intel.com>
This commit is contained in:
@@ -2558,6 +2558,9 @@ Ikev2EncodePacket (
|
||||
// Encrypt all payload and transfer IKE packet header from Host order to Network order.
|
||||
//
|
||||
Status = Ikev2EncryptPacket (SessionCommon, IkePacket);
|
||||
if (EFI_ERROR (Status)) {
|
||||
return Status;
|
||||
}
|
||||
} else {
|
||||
//
|
||||
// Fill in the lenght into IkePacket header and transfer Host order to Network order.
|
||||
|
Reference in New Issue
Block a user