/** @file\r
Udp6 driver's whole implementation.\r
\r
- Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2009 - 2016 Intel Corporation. All rights reserved.<BR>\r
\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
EFI_UDP6_SESSION_DATA *Udp6Session;\r
UINTN Enqueued;\r
\r
+ if (Packet->TotalSize < sizeof (EFI_UDP_HEADER)) {\r
+ NetbufFree (Packet);\r
+ return;\r
+ }\r
+ \r
//\r
// Get the datagram header from the packet buffer.\r
//\r
//\r
// Wrong checksum.\r
//\r
+ NetbufFree (Packet);\r
return;\r
}\r
}\r
LIST_ENTRY *Entry;\r
UDP6_INSTANCE_DATA *Instance;\r
\r
+ if (Packet->TotalSize < sizeof (EFI_UDP_HEADER)) {\r
+ NetbufFree (Packet);\r
+ return;\r
+ }\r
+ \r
Udp6Header = (EFI_UDP_HEADER *) NetbufGetByte (Packet, 0, NULL);\r
ASSERT (Udp6Header != NULL);\r
\r