]> git.proxmox.com Git - mirror_edk2.git/blobdiff - MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Wrq.c
Refine code to make it more safely.
[mirror_edk2.git] / MdeModulePkg / Universal / Network / Mtftp4Dxe / Mtftp4Wrq.c
index 412c472e42e6c93878477d8a32c623ce8a5eb9da..e8257147006bff793a58e9f3d772e26c07bb5f6f 100644 (file)
@@ -1,7 +1,7 @@
 /** @file\r
   Routines to process Wrq (upload).\r
   \r
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>\r
 This program and the accompanying materials\r
 are licensed and made available under the terms and conditions of the BSD License\r
 which accompanies this distribution.  The full text of the license may be found at\r
@@ -398,6 +398,7 @@ Mtftp4WrqInput (
 \r
   } else {\r
     Packet = (EFI_MTFTP4_PACKET *) NetbufGetByte (UdpPacket, 0, NULL);\r
+    ASSERT (Packet != NULL);\r
   }\r
 \r
   Opcode = NTOHS (Packet->OpCode);\r