diff options
author | Eric Dong <eric.dong@intel.com> | 2014-06-26 03:24:25 +0000 |
---|---|---|
committer | ydong10 <ydong10@6f19259b-4bc3-4df7-8a09-765794883524> | 2014-06-26 03:24:25 +0000 |
commit | 523f48e771b1088c6e2cfddc5c56cde1ef9a2ab0 (patch) | |
tree | 91d3cdacf538e40a24922981037cd413af4f6123 /MdeModulePkg/Universal/Network/Mtftp4Dxe | |
parent | d0f65b21c58b958ba370e774c6fe3ddc5ff1f3c7 (diff) | |
download | edk2-platforms-523f48e771b1088c6e2cfddc5c56cde1ef9a2ab0.tar.xz |
Refine code to make it more safely.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Eric Dong <eric.dong@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@15598 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/Network/Mtftp4Dxe')
-rw-r--r-- | MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Rrq.c | 3 | ||||
-rw-r--r-- | MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Wrq.c | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Rrq.c b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Rrq.c index ae157c5e0a..21547ee3af 100644 --- a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Rrq.c +++ b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Rrq.c @@ -1,7 +1,7 @@ /** @file
Routines to process Rrq (download).
-Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -704,6 +704,7 @@ Mtftp4RrqInput ( } else {
Packet = (EFI_MTFTP4_PACKET *) NetbufGetByte (UdpPacket, 0, NULL);
+ ASSERT (Packet != NULL);
}
Opcode = NTOHS (Packet->OpCode);
diff --git a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Wrq.c b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Wrq.c index 412c472e42..e825714700 100644 --- a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Wrq.c +++ b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Wrq.c @@ -1,7 +1,7 @@ /** @file
Routines to process Wrq (upload).
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -398,6 +398,7 @@ Mtftp4WrqInput ( } else {
Packet = (EFI_MTFTP4_PACKET *) NetbufGetByte (UdpPacket, 0, NULL);
+ ASSERT (Packet != NULL);
}
Opcode = NTOHS (Packet->OpCode);
|