summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Input.c
diff options
context:
space:
mode:
Diffstat (limited to 'MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Input.c')
-rw-r--r--MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Input.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Input.c b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Input.c
index bd15fc2e17..d985b1aeb6 100644
--- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Input.c
+++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Input.c
@@ -849,7 +849,8 @@ Ip4AccpetFrame (
goto DROP;
}
- Head = (IP4_HEAD *) NetbufGetByte (Packet, 0, NULL);
+ Head = (IP4_HEAD *) NetbufGetByte (Packet, 0, NULL);
+ ASSERT (Head != NULL);
OptionLen = (Head->HeadLen << 2) - IP4_MIN_HEADLEN;
if (OptionLen > 0) {
Option = (UINT8 *) (Head + 1);
@@ -899,6 +900,7 @@ Ip4AccpetFrame (
// is transfered to the packet process logic.
//
Head = (IP4_HEAD *) NetbufGetByte (Packet, 0, NULL);
+ ASSERT (Head != NULL);
Status = Ip4PreProcessPacket (
IpSb,
&Packet,