X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=NetworkPkg%2FIp6Dxe%2FIp6ConfigNv.c;h=1b878a56a3aae87b8d8f0909a5b1bf791f8408af;hb=c9c270193a8f1d64d9664bd191ab57e217206996;hp=546cd868076acbed7645efc0e1df4d403a2c980f;hpb=130df89019f65a8635a7583e76027ee6f2084e1c;p=mirror_edk2.git diff --git a/NetworkPkg/Ip6Dxe/Ip6ConfigNv.c b/NetworkPkg/Ip6Dxe/Ip6ConfigNv.c index 546cd86807..1b878a56a3 100644 --- a/NetworkPkg/Ip6Dxe/Ip6ConfigNv.c +++ b/NetworkPkg/Ip6Dxe/Ip6ConfigNv.c @@ -1,7 +1,7 @@ /** @file Helper functions for configuring or obtaining the parameters relating to IP6. - Copyright (c) 2010 - 2013, Intel Corporation. All rights reserved.
+ Copyright (c) 2010 - 2014, 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 @@ -600,6 +600,7 @@ Ip6ParseAddressListFromString ( return EFI_INVALID_PARAMETER; } + ZeroMem (&AddressInfo, sizeof (EFI_IP6_ADDRESS_INFO)); LocalString = (CHAR16 *) AllocateCopyPool (StrSize (String), String); if (LocalString == NULL) { return EFI_OUT_OF_RESOURCES; @@ -695,7 +696,6 @@ Ip6ConvertInterfaceInfoToString ( CHAR16 PortString[ADDRESS_STR_MAX_SIZE]; CHAR16 FormatString[8]; EFI_STRING_ID StringId; - EFI_STATUS Status; if ((IfInfo == NULL) || (HiiHandle == NULL) || (IfrNvData == NULL)) { return EFI_INVALID_PARAMETER; @@ -718,9 +718,9 @@ Ip6ConvertInterfaceInfoToString ( // Print the interface type. // if (IfInfo->IfType == Ip6InterfaceTypeEthernet) { - StrCpy (PortString, IP6_ETHERNET); + CopyMem (PortString, IP6_ETHERNET, sizeof (IP6_ETHERNET)); } else if (IfInfo->IfType == Ip6InterfaceTypeExperimentalEthernet) { - StrCpy (PortString, IP6_EXPERIMENTAL_ETHERNET); + CopyMem (PortString, IP6_EXPERIMENTAL_ETHERNET, sizeof (IP6_EXPERIMENTAL_ETHERNET)); } else { // // Refer to RFC1700, chapter Number Hardware Type. @@ -747,9 +747,9 @@ Ip6ConvertInterfaceInfoToString ( for (Index = 0; Index < IfInfo->HwAddressSize; Index++) { if (IfInfo->HwAddress.Addr[Index] < 0x10) { - StrCpy (FormatString, L"0%x-"); + CopyMem (FormatString, L"0%x-", sizeof (L"0%x-")); } else { - StrCpy (FormatString, L"%x-"); + CopyMem (FormatString, L"%x-", sizeof (L"%x-")); } Number = UnicodeSPrint ( @@ -780,17 +780,7 @@ Ip6ConvertInterfaceInfoToString ( return EFI_OUT_OF_RESOURCES; } - // - // Print the route table information. - // - Status = Ip6ConvertAddressListToString ( - PortString, - HiiHandle, - Ip6ConfigNvRouteTable, - IfInfo->RouteTable, - IfInfo->RouteCount - ); - return Status; + return EFI_SUCCESS; } /**