summaryrefslogtreecommitdiff
path: root/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcSupport.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/UefiPxeBcDxe/PxeBcSupport.c
parent33338afebd3004e24d642e6dd7d053cda83990f1 (diff)
downloadedk2-platforms-e285199897e538523f762cb5b3900e81f872035a.tar.xz
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/UefiPxeBcDxe/PxeBcSupport.c')
-rw-r--r--MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcSupport.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcSupport.c b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcSupport.c
index 0a67fdeda2..d425b1ff8f 100644
--- a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcSupport.c
+++ b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcSupport.c
@@ -1,7 +1,7 @@
/** @file
Support routines for PxeBc.
-
-Copyright (c) 2007 - 2009, Intel Corporation.<BR>
+
+Copyright (c) 2007 - 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
@@ -18,7 +18,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
/**
This function returns SMBIOS string given the string number.
-
+
@param Smbios Pointer to SMBIOS structure
@param StringNumber String number to return. 0 is used to skip all
strings and point to the next SMBIOS structure.
@@ -97,6 +97,7 @@ GetSmbiosSystemGuidAndSerialNumber (
if (EFI_ERROR (Status)) {
return EFI_NOT_FOUND;
}
+ ASSERT (SmbiosTable != NULL);
Smbios.Hdr = (SMBIOS_STRUCTURE *) (UINTN) SmbiosTable->TableAddress;
SmbiosEnd.Raw = (UINT8 *) (UINTN) (SmbiosTable->TableAddress + SmbiosTable->TableLength);
@@ -137,7 +138,7 @@ GetSmbiosSystemGuidAndSerialNumber (
/**
- The common notify function associated with various PxeBc events.
+ The common notify function associated with various PxeBc events.
@param Event The event signaled.
@param Context The context.
@@ -156,13 +157,13 @@ PxeBcCommonNotify (
/**
This function initialize(or configure) the Udp4Write instance.
-
+
@param Udp4 Pointer to the EFI_UDP4_PROTOCOL instance.
@param StationIp Pointer to the station ip address.
@param SubnetMask Pointer to the subnetmask of the station ip address.
@param Gateway Pointer to the gateway ip address.
@param SrcPort Pointer to the srouce port of the station.
-
+
@retval EFI_SUCCESS The configuration settings were set, changed, or reset successfully.
@retval EFI_NO_MAPPING When using a default address, configuration (DHCP, BOOTP,
RARP, etc.) is not finished yet.
@@ -177,7 +178,7 @@ PxeBcCommonNotify (
@retval EFI_DEVICE_ERROR An unexpected network or system error occurred and this instance
was not opened.
@retval Others Please examine the function Udp4->Routes(Udp4, FALSE, &mZeroIp4Addr, &mZeroIp4Addr, Gateway) returns.
-
+
**/
EFI_STATUS
PxeBcConfigureUdpWriteInstance (