Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@17740
6f19259b-4bc3-4df7-8a09-
765794883524
Mde UEFI library API implementation.\r
Print to StdErr or ConOut defined in EFI_SYSTEM_TABLE\r
\r
Mde UEFI library API implementation.\r
Print to StdErr or ConOut defined in EFI_SYSTEM_TABLE\r
\r
- Copyright (c) 2007 - 2012, Intel Corporation. All rights reserved.<BR>\r
+ Copyright (c) 2007 - 2015, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
SizeRequired = sizeof(CHAR16) + (CharactersRequired * sizeof(CHAR16));\r
}\r
\r
SizeRequired = sizeof(CHAR16) + (CharactersRequired * sizeof(CHAR16));\r
}\r
\r
- BufferToReturn = AllocateZeroPool(SizeRequired);\r
+ BufferToReturn = AllocateCopyPool(SizeRequired, String);\r
\r
if (BufferToReturn == NULL) {\r
return NULL;\r
}\r
\r
\r
if (BufferToReturn == NULL) {\r
return NULL;\r
}\r
\r
- if (String != NULL) {\r
- StrCpy(BufferToReturn, String);\r
- }\r
-\r
UnicodeVSPrint(BufferToReturn + StrLen(BufferToReturn), (CharactersRequired+1) * sizeof(CHAR16), FormatString, Marker);\r
\r
ASSERT(StrSize(BufferToReturn)==SizeRequired);\r
UnicodeVSPrint(BufferToReturn + StrLen(BufferToReturn), (CharactersRequired+1) * sizeof(CHAR16), FormatString, Marker);\r
\r
ASSERT(StrSize(BufferToReturn)==SizeRequired);\r