diff options
author | hhuan13 <hhuan13@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-07-08 05:29:10 +0000 |
---|---|---|
committer | hhuan13 <hhuan13@6f19259b-4bc3-4df7-8a09-765794883524> | 2010-07-08 05:29:10 +0000 |
commit | a4ac31e0a07760a52aed46a1fa2786b3fcb16685 (patch) | |
tree | ca519fa5d768fc7d6732b02eeb353ef2214ef1ce /MdeModulePkg | |
parent | 787cd144dabd4436640bc3e3af803d87df2114d6 (diff) | |
download | edk2-platforms-a4ac31e0a07760a52aed46a1fa2786b3fcb16685.tar.xz |
Remove ASSERT and change to if ()
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10640 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'MdeModulePkg')
-rw-r--r-- | MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDhcp.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDhcp.c b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDhcp.c index f323b83c94..ce58321eb0 100644 --- a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDhcp.c +++ b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDhcp.c @@ -193,10 +193,11 @@ PxeBcParseCachedDhcpPacket ( // RFC 2132, Section 9.5 does not strictly state Bootfile name (option 67) is null
// terminated string. So force to append null terminated character at the end of string.
//
- ASSERT (Options[PXEBC_DHCP4_TAG_INDEX_BOOTFILE] != NULL);
- Ptr8 = (UINT8*)&Options[PXEBC_DHCP4_TAG_INDEX_BOOTFILE]->Data[0];
- Ptr8 += Options[PXEBC_DHCP4_TAG_INDEX_BOOTFILE]->Length;
- *Ptr8 = '\0';
+ if (Options[PXEBC_DHCP4_TAG_INDEX_BOOTFILE] != NULL) {
+ Ptr8 = (UINT8*)&Options[PXEBC_DHCP4_TAG_INDEX_BOOTFILE]->Data[0];
+ Ptr8 += Options[PXEBC_DHCP4_TAG_INDEX_BOOTFILE]->Length;
+ *Ptr8 = '\0';
+ }
} else if ((Options[PXEBC_DHCP4_TAG_INDEX_BOOTFILE] == NULL) &&
(Offer->Dhcp4.Header.BootFileName[0] != 0)) {
|