/** @file\r
Miscellaneous routines for HttpDxe driver.\r
\r
-Copyright (c) 2015, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.<BR>\r
(C) Copyright 2016 Hewlett Packard Enterprise Development LP<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
EFI_STATUS Status;\r
CHAR8 *RequestMsg;\r
CHAR8 *Url;\r
+ UINTN UrlSize;\r
UINTN RequestMsgSize;\r
\r
ValueInItem = (HTTP_TOKEN_WRAP *) Item->Value;\r
//\r
// Parse the URI of the remote host.\r
//\r
- Url = AllocatePool (StrLen (ValueInItem->HttpToken->Message->Data.Request->Url) + 1);\r
+ UrlSize = StrLen (ValueInItem->HttpToken->Message->Data.Request->Url) + 1;\r
+ Url = AllocatePool (UrlSize);\r
if (Url == NULL) {\r
return EFI_OUT_OF_RESOURCES;\r
}\r
\r
- UnicodeStrToAsciiStr (ValueInItem->HttpToken->Message->Data.Request->Url, Url);\r
+ UnicodeStrToAsciiStrS (ValueInItem->HttpToken->Message->Data.Request->Url, Url, UrlSize);\r
\r
//\r
// Create request message.\r