X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=NetworkPkg%2FUefiPxeBcDxe%2FPxeBcSupport.c;h=36b0665a96b888a9753ffa493d3c1b5d6d34a12e;hp=f918d6a29893e1fc24e0e566bde06f86820e852c;hb=fa848a4048943251fc057fe8d6c5a82e01d2ffb6;hpb=f43b7a54120e4fdff62d149f78c244148c20d7a8 diff --git a/NetworkPkg/UefiPxeBcDxe/PxeBcSupport.c b/NetworkPkg/UefiPxeBcDxe/PxeBcSupport.c index f918d6a298..36b0665a96 100644 --- a/NetworkPkg/UefiPxeBcDxe/PxeBcSupport.c +++ b/NetworkPkg/UefiPxeBcDxe/PxeBcSupport.c @@ -1,7 +1,7 @@ /** @file Support functions implementation for UefiPxeBc Driver. - Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.
+ Copyright (c) 2007 - 2015, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -28,7 +28,7 @@ **/ EFI_STATUS -PxeBcFlushStaionIp ( +PxeBcFlushStationIp ( PXEBC_PRIVATE_DATA *Private, EFI_IP_ADDRESS *StationIp, EFI_IP_ADDRESS *SubnetMask OPTIONAL @@ -59,10 +59,6 @@ PxeBcFlushStaionIp ( } Status = Private->Ip6->Receive (Private->Ip6, &Private->Icmp6Token); - if (EFI_ERROR (Status)) { - goto ON_EXIT; - } - } else { ASSERT (SubnetMask != NULL); CopyMem (&Private->Udp4CfgData.StationAddress, StationIp, sizeof (EFI_IPv4_ADDRESS)); @@ -82,10 +78,6 @@ PxeBcFlushStaionIp ( } Status = Private->Ip4->Receive (Private->Ip4, &Private->IcmpToken); - if (EFI_ERROR (Status)) { - goto ON_EXIT; - } - } ON_EXIT: @@ -1400,6 +1392,7 @@ PxeBcUintnToAscDecWithFormat ( @param[in] Number Numeric value to be converted. @param[in] Buffer The pointer to the buffer for ASCII string. + @param[in] BufferSize The maxsize of the buffer. @return Length The actual length of the ASCII string. @@ -1407,7 +1400,8 @@ PxeBcUintnToAscDecWithFormat ( UINTN PxeBcUintnToAscDec ( IN UINTN Number, - IN UINT8 *Buffer + IN UINT8 *Buffer, + IN UINTN BufferSize ) { UINTN Index; @@ -1423,7 +1417,7 @@ PxeBcUintnToAscDec ( Number = (UINTN) (Number / 10); } while (Number != 0); - AsciiStrCpy ((CHAR8 *) Buffer, &TempStr[Index]); + AsciiStrCpyS ((CHAR8 *) Buffer, BufferSize, &TempStr[Index]); Length = AsciiStrLen ((CHAR8 *) Buffer);