X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=NetworkPkg%2FHttpDxe%2FHttpProto.c;h=6373f07215569319b024d91a31799ec23c501182;hp=486b20304f5274be71b35026c09c3f715438914b;hb=b9679cd7458110573dd4614148433312b61a1e26;hpb=b68ccac17c7e6340ab7b3654ea51c86ad6b4201d diff --git a/NetworkPkg/HttpDxe/HttpProto.c b/NetworkPkg/HttpDxe/HttpProto.c index 486b20304f..6373f07215 100644 --- a/NetworkPkg/HttpDxe/HttpProto.c +++ b/NetworkPkg/HttpDxe/HttpProto.c @@ -1,7 +1,7 @@ /** @file Miscellaneous routines for HttpDxe driver. -Copyright (c) 2015, Intel Corporation. All rights reserved.
+Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.
(C) Copyright 2016 Hewlett Packard Enterprise Development LP
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -1489,6 +1489,7 @@ HttpTcpTransmit ( EFI_STATUS Status; CHAR8 *RequestMsg; CHAR8 *Url; + UINTN UrlSize; UINTN RequestMsgSize; ValueInItem = (HTTP_TOKEN_WRAP *) Item->Value; @@ -1499,12 +1500,13 @@ HttpTcpTransmit ( // // Parse the URI of the remote host. // - Url = AllocatePool (StrLen (ValueInItem->HttpToken->Message->Data.Request->Url) + 1); + UrlSize = StrLen (ValueInItem->HttpToken->Message->Data.Request->Url) + 1; + Url = AllocatePool (UrlSize); if (Url == NULL) { return EFI_OUT_OF_RESOURCES; } - UnicodeStrToAsciiStr (ValueInItem->HttpToken->Message->Data.Request->Url, Url); + UnicodeStrToAsciiStrS (ValueInItem->HttpToken->Message->Data.Request->Url, Url, UrlSize); // // Create request message.