summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Option.c
diff options
context:
space:
mode:
authorvanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2010-01-08 02:35:56 +0000
committervanjeff <vanjeff@6f19259b-4bc3-4df7-8a09-765794883524>2010-01-08 02:35:56 +0000
commite285199897e538523f762cb5b3900e81f872035a (patch)
treeaad7875d4dfb9f1705796b9c405c4f5549df18e1 /MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Option.c
parent33338afebd3004e24d642e6dd7d053cda83990f1 (diff)
downloadedk2-e285199897e538523f762cb5b3900e81f872035a.zip
edk2-e285199897e538523f762cb5b3900e81f872035a.tar.gz
edk2-e285199897e538523f762cb5b3900e81f872035a.tar.bz2
refine the code and add more security check.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@9691 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Option.c')
-rw-r--r--MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Option.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Option.c b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Option.c
index 93e548e..bfefb66 100644
--- a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Option.c
+++ b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Option.c
@@ -1,7 +1,7 @@
/** @file
Routines to process MTFTP4 options.
-
-Copyright (c) 2006 - 2009, Intel Corporation<BR>
+
+Copyright (c) 2006 - 2010, Intel Corporation<BR>
All rights reserved. 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
@@ -224,8 +224,8 @@ Mtftp4FillOptions (
/**
- Allocate and fill in a array of Mtftp options from the Packet.
-
+ Allocate and fill in a array of Mtftp options from the Packet.
+
It first calls Mtftp4FillOption to get the option number, then allocate
the array, at last, call Mtftp4FillOption again to save the options.
@@ -525,6 +525,7 @@ Mtftp4ParseOptionOack (
if (EFI_ERROR (Status) || (Count == 0)) {
return Status;
}
+ ASSERT (OptionList != NULL);
Status = Mtftp4ParseOption (OptionList, Count, FALSE, MtftpOption);